Twilio Elastic SIP Trunking and dSIPRouter

dSIPRouter 0.63 was recently released with out of the box support for Twilio Elastic SIP Trunking. The design goal for the first release of this feature was to make it simple for a user to download dSIPRouter and setup Twilio as the carrier.

Assumptions:

  • dSIPRouter is installed. If not, you can install it within 12 minutes. There is a one-line command that will kick-off the installer and it will take about 12 minutes to install. The details can be found here{:target=”_blank”}

  • You have a Twilio account. It only takes a few minutes to create an account. You can create an account by going here

Setting up Twilio Elastic SIP Trunking

  1. Login to Twilio
  2. Enter Elastic SIP Trunks in the top right search bar and click enter.  Notice that Twilio gives you a double digit Trial Balance.  This is better then most SIP providers that I worked with in the past.

  3. Click the + sign to create a new SIP Trunk.  Enter a name for your SIP Trunk and click “Create”

  4. You will see a screen that looks like this

  5. Since we are focused on sending calls outbound we are going to click on the “Termination” menu option.  We are going to use IP Authentication.  So, we just need to define a unique SIP URI for signaling to Twilio. Twilio doesn’t accept SIP requests that come from an IP address.  Also, we need to define an Access Control List that contains the IP address of your dSIPRouter instance.  If you have multiple instances of dSIPRouter then define all of the IP addresses.

This is all we need to do on the Twilio side.  In the next section we will focus on configuring dSIPRouter

Setting up dSIPRouter to work with Twilio Elastic SIP Trunking

Setting up the Carrier Group

  1. Login to dSIPRouter
  2. Click Carrier Groups
  3. Click Add
  4. Provide a name for the Carrier Group and click Add

  5. Click on the Carrier Group that you just added

  6. Click on Endpoint and click Add.
  7. Enter the Twilio SIP URI that you defined in the Twilio portal

  8. Click “Reload Kamailio”

Make the Twilio Carrier Group the Default Outbound Carrier

  1. Click on Global Outbound Routes
  2. Click on the Default Outbound Route and select Twilio Outbound

Making an Outbound Call

In this section we are going to use IP authentication to send a call using a softphone.

  1. Click Endpoint Groups
  2. Click Add enter “Test Endpoint” as the Friendly Name
  3. Click the Endpoint Tab and enter the IP address you will send calls from
  4. Click Add

  5. Click “Reload Kamailio”

  6. Start your softphone and configure it to send a call to dSIPRouter