VoIP

sudo apt-get install asterisk

After completing this guide your Asterisk will be able to : Host calls locally Access mail boxes

We will be editing the following files: sip.conf extensions.conf voicemail.conf

These files are located in: /etc/asterisk

Making a backup of sip.conf

sudo mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.orig

Creating a new sip.conf and configuring it

sudo vi /etc/asterisk/sip.conf [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.1.0/255.255.255.0

[7001] type=friend host=dynamic secret=123 context=internal

[7002] type=friend host=dynamic secret=456 context=internal

Making a backup of extensions.conf sudo mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.orig

sudo vi /etc/asterisk/extensions.conf [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(7002@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

Making a backup of voicemail.conf

sudo mv /etc/asterisk/voicemail.conf /etc/asterisk/voicemail.conf.orig

sudo vi /etc/asterisk/voicemail.conf [main] 7001 => 123

7002 => 456

Reloading Asterisk to apply the configuration

sudo asterisk -rx reload

OR

sudo /etc/init.d/asterisk restart