Asterisk SIP Trunk Configuration

Last modified: December 27, 2018

Asterisk is an open source application distributed by Digium under the GNU General Public License (GPL), Asterisk powers a broad family of products for business of all sizes.

If you are not experienced in the installation of Asterisk we suggest you use one of the GUI interfaces, this will allow the administrators to view and edit all the aspects of Asterisk via a Web interface.

The free versions of the GUI are available in these links:

If you are looking to buy Asterisk VoIP service for your business you have come to the right place, with unbeatable prices to United States and United Kingdom at 0.008 per minute and Canada at 0.005 (that’s under 1 cent).

 

Asterisk SIP Trunk Configuration Details

To start making and receiving calls using your Switch2VoIP SIP Trunk please verify that your Asterisk server is configured as follows: [Switch2Voip] username={USERNAME} type=peer secret={PASSWORD} progressinband=never port=5060 nat=auto insecure=very ignoresdpversion=yes host=213.166.103.6 dtmfmode=rfc2833 context=from-trunk canreinvite=no allow=g729&g711&g723 qualify=no fromuser=+15555555555 (Change this phone number to the CallerID you wish) Asterisk account entry configuration  

Asterisk Registration

Register=>USERNAME:PASSWORD@213.166.103.6 Global string: Switch2Voip=SIP/Switch2Voip  

Asterisk Incoming Settings:

(IMPORTANT: To receive calls the customer must set up inbound route for DID) username={ACCOUNT NUMBER} password={PASSWORD} disallow=all type=peer port=5060 nat=auto insecure=invite host=169.132.196.33 dtmfmode=rfc2833 context=from-trunk canreinvite=no allow=ulaw allow=alaw allow=g729  

Dial Plan in Asterisk

Your USA dialplan should look something like this: exten => _91.,1,Set(callerid(num)=+1XXXXXXXXXX) exten => _91.,2,Set(callerid(ani)=Phone number) exten => _91.,3,AGI(agi://127.0.0.1:4577/call_log) exten => _91.,4,Dial(sip/${EXTEN:1}@Switch2Voip,55,o) exten => _91,5,Hangup  

Asterisk United Kingdom Dial Plan dialplan

If you are also dialing to the UK and you want to use both USA and UK dialplans then your Asterisk dialplan for UK and USA should look like this: Make sure you change the prefix on your UK campaign to 8 and leave 9 for USA. Copy evertything below this line and paste it on your dialer trunk configuration. exten => _91.,1,Set(callerid(num)=+15555555555) exten => _91.,2,Set(callerid(ani)=Phone number) exten => _91.,3,AGI(agi://127.0.0.1:4577/call_log) exten => _91.,4,Dial(sip/${EXTEN:1}@Switch2Voip,55,o) exten => _91,5,Hangup exten => _8011.,1,AGI(agi://127.0.0.1:4577/call_log) exten => _8011.,2,Dial(sip/${EXTEN:1}@Switch2Voip,55,o) exten => _8011.,3,Hangup    

ADD CREDITS TO VOIP ACCOUNT