Twilio BYOC Trunk

This user guide introduces Twillio integration with DIDWW SBC and describes the perequisites for configuration.

To set up the Trunk, you will need to follow these steps:

  1. Go to the BYOC trunks configuration page in the Twilio Console

  2. Click on the blue plus button to add a new trunk. Give it a friendly name e.g. DIDWW Trunk

  3. Next - set up Origination


DIDWW by default uses Digest Authentication that allows Customers to authenticate the outbound calls using Username and Password. Certain Twilio users are unable to use this method for various reasons, therefore, DIDWW has implemented the authorization based on the Twillio AccountSID.

SID - stands for String Identifier. It’s a unique key that is used to identify specific resources. At Twilio, each SID has 34 digits and you can identify the type of SID and the product it’s associated with by the first two characters.

For more information about Twilio SID refer to this article.

  1. Click on Origination Connection Policy.

  2. Click on the blue plus button to add a new Policy. Name the policy DIDWW Out

  3. In the new policy, add an Origination Target by clicking the blue plus button Add a SIP URI, leave the other settings as the default // priority and weight 10 - more domains/global domain coming once rolled to production

  1. Go back to the BYOC Trunk, select the DIDWW, and select the Origination Policy you have just created

  2. In the FROM DOMAIN box, select the domain you have created (this must be correct, as DIDWW use the from domain and the account SID to verify calls are being sent by your trunk)


SID value found in the INVITE is required to be sent to our Support for further configuration Outbound trunk configuration.


Setting up SIP domain

Set up a SIP domain for the customer account following these steps:

  1. Go to SIP Domains

  2. Click the blue plus button to add a new domain.

  3. Create a SIP URI in this format:



  1. Click the plus next to the IP Access Control List (ACL), and add the appropriate IP addresses for the carrier concerned into an ACL: / 32 // DIDWW Hong Kong / 32 // DIDWW Singapore / 32 // DIDWW Miami / 32 // DIDWW Los Angeles / 32 // DIDWW Frankfurt / 32 // DIDWW New York / 32 // DIDWW Amsterdam / 21 // DIDWW RTP
  1. Create credentials in the credential list per the inbound trunk in DIDWW

  2. Click Save, go to setting up BYOC Trunk

DIDWW origination IP addresses are listed here.

Testing Configurations

To terminate calls (i.e. have DIDWW host the number, and send any inbound calls to Twilio), we need to follow these steps. This assumes that you have set up the SIP domain for the sub-account, and the BYOC trunk instructions.

  1. Return to the BYOC trunk config page and select the SIP Domain you created above.

  2. Set the primary and secondary call handler URLs as follows:

{{uri for your api’s webhooks}}

  1. Set the Status Webhook URL as follows:

{{uri for your api status handler}}

  1. Save the trunk.

  2. Authorise the number as a CLI in Twilio using the Verified Caller ID workflow

  3. Test calling in both directions. You can download PCAP files from the call details page once you have made a file, and verify settings using Wireshark