Configuring Elastic SIP Trunking as a Twilio BYOC Trunk

Sinch Elastic SIP Trunking can easily be used with your Twilio applications. Follow this guide to learn how!

Before you start

Before you begin setting up your Sinch Elastic SIP trunk make sure you have done the following:

  • Sign up for a free account at https://www.sinch.com/ and request access for Elastic SIP Trunking. Need help? Click here for instructions.
  • If you have not already done so, configure and create your Elastic SIP trunk. Instructions on how to do this can be found here .
  • Ensure you note the fully qualified domain name (FQDN) that was created on your SIP Trunk. You will need this while setting up your IP-PBX or SIP Application.
  • Add the Sinch Signaling IPs to your Twilio Access Control list.

Configuring your BYOC Twilio Trunk

  1. Log into your Twilio account and under “develop” navigate to Voice --> Manage --> BYOC Trunks and click the blue + button to add a new “Bring Your Own Carrier” (BYOC) Trunk.

    create new byoc trunk

  2. This opens up the general settings page for the BYOC trunk. Click the + button next to Termination SIP Domains . This will bring up a wizard to create a new Termination Domain.

    create new termination domain

  3. Create a Termination SIP URI. This is the URL that you will send to when sending traffic towards Twilio. Add the ACL which contains the Sinch Elastic SIP Trunking signaling IPs to the trunk.

    add acl

    Once done, click the “save” button at the bottom of the screen.

  4. From the BYOC configuration screen, click the + button next to Origination Connection Policy . This will open the wizard where you will configure the settings to send calls out towards your Sinch Elastic SIP Trunk.

    create origination connection policy

  5. Give your origination connection policy a friendly name to proceed to the configuration page.

    add friendly name

  6. Once in the SIP Origination configuration screen select the blue + sign next to “Origination URI” to create a new entry.

    add sip URI

    In the Origination SIP URI modal dialog, enter the FQDN of your Sinch Elastic SIP Trunk. This needs to be entered as a SIP URI. So preface it with sip:. For example, if your Sinch SIP Trunk FQDN was mysinchtrunk.pstn.sinch.com, you would enter sip:mysinchtrunk.pstn.sinch.com. Then click the Create button.

  7. Once finished, click the Save button.

    click save

  8. BYOC configuration allows the customer to use Twilio for programmable voice but to use a 3rd party number and termination provider instead of Twilio. You will need the BYOC trunk ID in order to instruct your application which BYOC trunk it should use when using the <Dial> method.

    specify byoc trunk id

    See an example of this change in the image below.

    adding code

    Together with the Origination Connection Policy defined earlier this will ensure that Sinch is used to terminate any PSTN call that your application needs to make.

Create your Sinch Endpoint

  1. Navigate to your Elastic SIP Trunk in your Sinch customer dashboard . You must create a new SIP Endpoint which points to your Twilio Trunk FQDN.

    add sip endpoint

  2. In the new SIP Endpoint wizard, add a friendly name for the endpoint and enter the FQDN of your Twilio BYOC trunk. This is the FQDN you created in the Twilio portal under “Termination SIP Domains.” Once done click Create .

    specify twilio trunk

    Note:

    It is important to note that these changes will not take effect until you click the Update SIP Trunk button at the bottom of the page.

  3. In the Sinch customer dashboard, navigate to the Access Control List section and add your Twilio IP addresses to the ACL which is configured on your SIP Trunk.

    add twilio ip addresses

  4. Save your configuration and now your Elastic SIP trunk should be operational and ready for traffic. Assign a number to your trunk and give it a try!
We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.