In the first article on Asterisk, we have seen the Asterisk installation steps and on the environment setup. In this article, we have give the configuration settings for two files iax.conf and extensions.conf which will be used to direct/receive calls from/to iax2 soft clients
File: iax.conf
[general] bindport = 4569 externip = 99.187.201.22 localnet = 192.168.0.0/255.255.255.0 bindaddr = 0.0.0.0 disallow=all allow=ulaw allow=alaw allow=gsm allow=ilbc jitterbuffer=yes register => NNNNNNNNNN:PPPPPP@201.192.22.232
[voip_provider] type=friend username=NNNNNNNNNN secret=PPPPPP host=201.192.22.232 context=outgoing
[NNNNNNNNNN] type=friend username=NNNNNNNNNN secret=PPPPPP host=201.192.22.232 context=incoming requirecalltoken=auto
[1000] type=friend username=1000 host=dynamic mailbox=1000 secret=1000 context=phones requirecalltoken=auto
File: extensions.conf
[general] autofallthrough=yes
[outgoing] exten => _[1-9].,1,Dial(IAX2/NNNNNNNNNN@201.192.22.232/${EXTEN}) exten => _00.,1,Dial(IAX2/NNNNNNNNNN@201.192.22.232/${EXTEN}) exten => _09XX,1,Dial(IAX2/NNNNNNNNNN@201.192.22.232/${EXTEN})
[internal] exten => 901,1,VoiceMailMain() exten => 901,2,Hangup() exten => 902,1,Meetme(1234,cdM) exten => 902,2,Hangup()
[incoming] exten => NNNNNNNNNN,1,Dial(IAX2/1000,20) exten => NNNNNNNNNN,2,Answer exten => NNNNNNNNNN,3,Wait(2) exten => NNNNNNNNNN,4,Set(TIMEOUT(digit)=3) exten => NNNNNNNNNN,5,Set(TIMEOUT(response)=10) exten => NNNNNNNNNN,6,Background(conf-usermenu) exten => 1,1,VoiceMail(1000@internal) exten => 2,2,MeetMe(1234,cdM)
[phones] include => internal include => outgoing
After saving these two files, start up asterisk. $ asterisk -vvvvgc
The above command will open the asterisk CLI - Command Line Interface