How to setup SIP trunks in Asterisk?

To setup the SIP trunks in your Asterisk machine is quite an easy job if you are using DIDforSale as your SIP provider. We will explain this process in step by step mode in the following manner:
A) Creating the Trunks for Inbound service:
Step 1: Login to your Asterisk PBX admin interface, go to Connectivity tab and click on Trunks and select the option of Add SIP Trunk and then give a name for the trunk as didforsale_1 and add the trunk Parameter as shown below:
host=209.216.2.211
type=peer
context=from-trunk
disallow=all
allow=ulaw
nat=yes
canreinvite=yes
insecure=very
dtmfmode=rfc2833
qualify=yes
Save and Apply the changes.
Step2 : Create a second trunk for inbound with trunk name as didforsale_2 and add the trunk Parameters as shown in below:
type=peer
nat=yes
insecure=very
host=209.216.15.70
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=yes
allow=ulaw
Save and Apply the changes.

Step 3: Create Inbound routes.


2) Creating the Trunks for Outbound Service:
Step 1:
Go to Connectivity and Click on Trunks and select the option Add SIP Trunk. and then give a name for the trunk as didforsale_out and add the trunk Parameter shown below:
type=peer
nat=yes
insecure==very
host=209.216.2.212
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=yes
allow=ulaw

Step 2:
Create a second trunk in the same way with trunk name as didforsale_out2 with the below trunk parameters
type=peer
nat=yes
insecure=very
host=209.216.15.71
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=yes
allow=ulaw

Step 3: Create Outbound Routes
Click on Outbound Routes option of your PBX interface. In Dialed Number manipulation rules, put 1X.  in Match pattern column for US and Canada calls. Select the both
Outgoing trunks and Save and Apply the settings.
If you have any questions or difficulty to setup the SIP trunks with our service, please feel free to write us at toanvnn@gmail.com, our team will work with you closely to get the service up and running.

Comments