Asterisk Setup Guide

Asterisk is a mature, open-source software PBX produced by Digium. It is a popular choice due to it’s large feature set.

Inbound Calls

SIP

To handle incoming calls translating to SIP addresses, first add this section to sip.conf:

[numbergroup-in]
type=friend
context=from-ng
host=sip.numbergroup-services.com
qualify=yes
insecure=invite

This tells asterisk to handle all calls from numbergroup using the from-ng context in extensions.conf

In extensions.conf, you simply create an extension as normal in the from-ng context, for example:

[from-ng]
exten => mainnumber,1,Dial(SIP/mainline)

This makes mainnumber@ dial the sip peer named ‘mainline’. mainline@ should be entered into the ‘Translates To:’ box in then numbergroup control panel.

SIP Trunk

Handling incoming calls through a trunk is slightly different to sip. Add this to sip.conf

register =>
:
@sip.numbergroup-services.com

[numbergroup-in]
type=friend
context=from-ng
host=sip.numbergroup-services.com
qualify=yes
insecure=invite

Incoming calls will dial the ‘s’ extension in the from-ng context in your dialplan. For example:

[from-ng]
exten => s,1,Dial(SIP/mainline)

Outbound Calls

First start by creating this section in sip.conf

[numbergroup-outbound]
type=peer
username=
secret=
host=sip.numbergroup-services.com
qualify=yes

To dial a number using numbergroup, add a pattern similar to the following in your extensions.conf:

exten => _X.,Dial(SIP/numbergroup-outbound/${EXTEN})

 

Comments are closed.