IPTISP/PBX Configuration: SIP Configurations

Move to the Asterisk file

zaman@zaman:~$ cd /etc/asterisk


Need to change some configuration files : sip.conf, extensions.conf, voicemail.conf 

But before that we need to take backup files so that if anything goes wrong we can get back to the previous version from backup files.


For backup configuration

zaman@zaman:~$ sudo mv sip.conf sip.conf.backup

zaman@zaman:~$ sudo mv extensions.conf extensions.conf.backup

zaman@zaman:~$ sudo mv voicemail.conf voicemail.conf.backup



For Editing the sip.conf

zaman@zaman:~$ sudo gedit sip.conf



Under SIP.CONF file we should write:


[general]

context=internal

allowguest=no

allowoverlap=no

bindport=5060

bindaddr=0.0.0.0

srvlookup=no

disallow=all

allow=ulaw

alwaysauthreject=yes

canreinvite=no

nat=yes

session-timers=refuse

localnet=192.168.0.0/255.255.255.0


[7001]

type=friend

host=dynamic

secret=7001

context=internal


[7002]

type=friend

host=dynamic

secret=7002

context=internal



For Editing the extensions.conf

zaman@zaman:~$ sudo gedit extensions.conf


Under EXTENSIONS.CONF file we should write:


[internal]

exten => 7001,1,Answer()

exten => 7001,2,Dial(SIP/7001,60)

exten => 7001,3,Playback(vm-nobodyavail)

exten => 7001,4,VoiceMail(7001@main)

exten => 7001,5,Hangup()


exten => 7002,1,Answer()

exten => 7002,2,Dial(SIP/7002,60)

exten => 7002,3,Playback(vm-nobodyavail)

exten => 7002,4,VoiceMail(7001@main)

exten => 7002,5,Hangup()


exten => 8001,1,VoicemailMain(7001@main)

exten => 8001,2,Hangup()


exten => 8002,1,VoicemailMain(7002@main)

exten => 8002,2,Hangup()



For Editing the voicemail.conf

zaman@zaman:~$sudo gedit voicemail.conf


Under VOICEMAIL.CONF file we should write:


[main]

7001 => 7001


7002 => 7002



Now we have to reload the asterisk


zaman@zaman:~$ sudo asterisk -r

zaman*CLI> reload


Check the sip clients are added or not


zaman*CLI> sip show peers



If sip show peers command doesn’t work then 


zaman*CLI> module show like sip

zaman*CLI> module load chan_sip.so






*****

0 Comments