(English) Asterisk

Asterisk

SIP Configuration

Asterisk SIP parameters are configured in ‘/etc/asterisk/sip.conf’ file.

Register the freelycall channel under the general section.

[general]
register => 2XXXX:password@freelycall.com/2XXXX

Then add the SIP user at the end of the file.

[freelycall] ;Any name assigned to this channel, to be used later in the dial plan.
name=2XXXX ;FreelyCall account number.
secret=password ;FreelyCall account password.
defaultuser=2XXXX
authuser=2XXXX
callerid=2XXXX
host=freelycall.com
fromdomain=freelycall.com
outboundproxy=freelycall.com
context=default
type=friend ;Channel of type friend, i.e. can make and receive calls.
canreinvite=no ;Indicates whether the channel can send re-invites.
dtmfmode=rfc2833 ;DTMF mode.
insecure=port,invite ;Channel security level.
nat=yes ;Indicates if channel is registered behind a NAT.
qualify=no ;Indicates whether channel has to keep sending registration attempts.
disallow=all ;Disallow all codecs,
allow=ulaw ;Enable the needed codecs.
allow=alaw
allow=g729
allow=ilbc
srvlookup=yes

Extensions Configuration

Add the inbound and outbound dial plans in the Asterisk extensions configuration file ‘/etc/asterisk/extensions.conf’.

Inbound dial plan:
exten = 2XXXX,1,Answer()
exten = 2XXXX,n,Goto(ivr,s,1)
exten = 2XXXX,n,Hangup()

Outbound dial plan:
exten = _X.,1,Dial(SIP/freelycall/${EXTEN})
exten = _X.,n,Hangup()