Asterisk PBX Configuration Guide

This step by step tutorial will guide you through Asterisk PBX configuration.

Note: Asterisk must be already installed. Installation guide is also available here.

Getting a SIP account

You can review and create mutliple SIP accounts by going to: Setup -> SIP accounts.

Choose either IP based authentication or Password based authentication.

Setting up SIP Extension

Copy and past the following to /etc/asterisk/sip.conf:

[commpeak] 
host=sip.commpeak.com 
type=peer 
qualify=yes 
disallow=all 
; If you want to change the codec priority, place ulaw before g729. 
allow=g729 
allow=ulaw 
; if username/password authentication was chosen
username=username 
secret=password 
context=commpeak

Setting up Dialplan

Edit extensions.conf file:

exten => _X.,1,Dial(SIP/commpeak/${EXTEN})

If you use extensions.ael instead, it's quite the same:

_X. => { 
Dial(SIP/commpeak/${EXTEN}) 
}

To explain briefly the configuration, you do not require to dial 00 before the number, you simply dial in E164 format, like 5212281282779.


This example uses our sip.commpeak.com alias hostname which will try to provide you the nearest POP to your location.

CommPeak provides 6 different SIP proxies, in the following locations:

However, we highly recommend that you ping all our POPs and pick the two best destinations for fail-over purposes.

You can then adjust your configuration by having two entries in sip.conf, for example:

[commpeak-brazil] 
host=brazil.sip.commpeak.com
type=peer
qualify=yes
disallow=all
; If you want to change the codec priority, place ulaw before g729.
allow=g729
allow=ulaw
; if username/password authentication was chosen
username=username
secret=password
context=commpeak

[commpeak-uswest] 
host=uswest.sip.commpeak.com
type=peer
qualify=yes
disallow=all
; If you want to change the codec priority, place ulaw before g729.
allow=g729
allow=ulaw
; if username/password authentication was chosen
username=username
secret=password
context=commpeak

and then do the following in extensions.conf:

exten => _X.,1,Dial(SIP/commpeak-brazil/${EXTEN}) 
exten => _X.,n,Dial(SIP/commpeak-uswest/${EXTEN})

You do not want to enter two SIP peers in the same Dial() line.
For further information, we strongly recommend you to take a look at www.voip-info.org



More tutorials