Asterisk Server with SIP Account Routing to Cell Phones

asteriskmobile-devicessip

I'm having trouble finding the exact documentation to do the following:

I have a SIP Account. I want my Asterisk Server on a VPS somewhere in the United States to accept the credentials of the SIP Account. When people call into my SIP account phone number at 111-222-3333 extension 55, it should re-route the call to my cell phone which is located somewhere in Canada.

Can anyone tell me how to do this? Or refer to me the relevant documentation?

Best Answer

You should do basically 2 things:

  1. Setup Asterisk server to allow proper registration of your SIP account. This is done configuring the SIP credentials at /etc/asterisk/sip.conf
  2. Configure Asterisk dialplan to map extension 55 as a dialout to your cellphone. This is done at /etc/asterisk/extension.conf

You will find extensive documentation about how to do this at the voip-info.org site: sip.conf and extension.conf). This other link seems to be a good example of what you need.

Heres a small example on how it could look like:

sip.conf

[mysipprovider] 
type=peer 
secret=password 
username=2345 
host=sipserver.mysipprovider.com 
fromuser=2345 
canreinvite=no 
insecure=very 
qualify=yes 
nat=yes 
context=from-mysipprovider ; this section will be defined in extensions.conf 

and at the extension.conf:

[from-mysipprovider]
exten => 55,1,Verbose(1|Echo test application)
exten => 55,n,Dial(SIP/mysipprovider/5551234); Here is the outbound call, the exact dialstring depends on outgoing provider and channeltype
exten => 55,n,Hangup()
Related Topic