dSIPRouter and Twilio Elastic Trunking Integration
We have made it super simple to connect dSIPRouter to Twilio Elastic SIP Trunking (ESIPT). The main component that makes this happen is the new CarrierGroup API. This API allows you to programmatically add carriers to dSIPRouter. This API follows the same format as our other dSIPRouter API. In this article, I will explain how to connect to Twilio ESIPT from the dSIPRouter UI and explain how to use the underlying API.
Installing dSIPRouter
The best way to install dSIPRouter is to use the one line installation commands which can be found here or use Terraform to deploy.Get Twilio Credentials
You can obtain Twilio credentials from the Twilio Console- Create a Twilio account or login to the Twilio Console if you have an existing account.
- Save the Account SID and Auth Token from the Twilio Console somewhere safe. You will need them to later
Create Carrier Group for Twilio
Now that dSIPRouter is installed let’s login and create a Carrier Group. This will allow you to setup a SIP connection between dSIPRouter and Twilio.- Click Carrier Groups
- Click Add
- You will need to enter a name for the Carrier Group, select Twilio from the Plugin, enter in the Twilio Account SID and Account Token that we saved in the last section.
- Click Add
Setup Default Outbound Route
Now make your new Twilio Carrier Group the default outbound route- Click “Outbound Routes”
- Select the first rule and change the route to the MackTwilioCarrierGroup
- Click Update
- Click “Reload Kamailio” in the upper right of the UI
Testing: Setup an Endpoint Group
We can now test a call by creating an End Point Group using IP Auth or Username/Password Auth. I will use IP Auth- Click Endpoint Groups
- Click Add
- Click Endpoints Tab
- Add your IP address and click Save
- Click Add
- Click “Reload Kamailio” in the upper right of the UI
Testing: Place a Call
We are going to use Zoiper to place a test call- Start Zoiper
- Add Account
- Just add a Domain and Username. Note, the username is the Caller ID that will be sent when you place a test call. Note, Twilio will only send calls to validated numbers on the account when your account is in Trial mode.
- Place a call. Make sure the number is e.164 format, which looks like this +19544242424