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

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

sip:out.didww.com // 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)

Important

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

Termination

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:

{{subdomain}}.sip.twilio.com

E.g. didww-acmeltd.sip.twilio.com

  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:

46.19.215.14 / 32 // DIDWW Hong Kong
46.19.214.14 / 32 // DIDWW Singapore
46.19.213.14 / 32 // DIDWW Miami
46.19.212.14 / 32 // DIDWW Los Angeles
46.19.210.14 / 32 // DIDWW Frankfurt
46.19.209.14 / 32 // DIDWW New York
185.238.173.14 / 32 // DIDWW Amsterdam
46.19.208.0 / 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