VoIP

= Asterisk = Installing Asterisk in Ubuntu sudo apt-get install asterisk

Standalone installation:

Download the latest ISO from below link & create a VM from it: http://www.asterisk.org/downloads/asterisknow https://wiki.asterisk.org/wiki/display/AST/Installing+AsteriskNOW

LAN Installation
This section will allow you 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 the 3 files: sudo mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.orig sudo mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.orig sudo mv /etc/asterisk/voicemail.conf /etc/asterisk/voicemail.conf.orig

sudo nano /etc/asterisk/sip.conf
 * 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

sudo nano /etc/asterisk/extensions.conf
 * 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

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

7002 => 456

Reloading Asterisk to apply the configuration

sudo asterisk -rx reload OR sudo /etc/init.d/asterisk restart

Conference Call
Backup original file: sudo mv /etc/asterisk/confbridge.conf /etc/asterisk/confbridge.conf.orig

Create & Edit the new file: sudo nano /etc/asterisk/confbridge.conf

[general] [default_bridge] type=bridge myoption=value myoption2=othervalue [default_user] type=user myoption=value myoption2=othervalue [sample_menu] type=menu DTMF=function otherDTMF=otherFunction
 * comments are preceded by a comma
 * the general section is blank
 * the general section is blank
 * Bridge Profile options go here
 * User Profile options go here
 * Conferece Menu options go here

[fancybridge] type=bridge max_members=20 mixing_interval=10 internal_sample_rate=auto record_conference=yes

[fancyuser] type=user music_on_hold_when_empty=yes music_on_hold_class=default announce_user_count_all=yes announce_join_leave=yes dsp_drop_silence=yes denoise=yes pin=456

[fancymenu] type=menu 1=toggle_mute 2=leave_conference 3=dialplan_exec(addcallers,1,1) 4=decrease_listening_volume 5=reset_listening_volume 6=increase_listening_volume 7=decrease_talking_volume 8=reset_talking_volume 9=increase_talking_volume 0=no_op
 * =playback_and_continue(conf-togglemute&press&digits/1&silence/1&conf-leave&press&digits/2&silence/1&add-a-caller&press&digits/3&silence/1&conf-decrease-talking&press&digits/4&silence/1&reset-talking&press&digits/5&silence/1&increase-talking&press&digits/6&silence/1&conf-decrease-listening&press&digits/7&silence/1&conf-reset-listening&press&digits/8&silence/1&conf-increase-listening&press&digits/9&silence/1&conf-exit-menu&press&digits/0)
 * 1=toggle_mute
 * 2=leave_conference
 * 3=dialplan_exec(addcallers,1,1)
 * 4=decrease_listening_volume
 * 5=reset_listening_volume
 * 6=increase_listening_volume
 * 7=decrease_talking_volume
 * 8=reset_talking_volume
 * 9=increase_talking_volume
 * 0=no_op

[addcaller] exten => 1,1,Originate(SIP/otherpeer,exten,conferences,100,1)

[conferences] exten => 100,1,ConfBridge(1234)

Restart asterisk to load new files.

PSTN Calling
Source: howtoforge.com

Troubleshooting
Asterisk Console: sudo asterisk -r

Debug Info: sudo asterisk -rvvv sudo asterisk -rvvvvvv


 * References