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:
Go to the BYOC trunks configuration page in the Twilio Console
Click on the blue plus button to add a new trunk. Give it a friendly name e.g. DIDWW Trunk
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.
Click on Origination Connection Policy.
Click on the blue plus button to add a new Policy. Name the policy DIDWW Out
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
Go back to the BYOC Trunk, select the DIDWW, and select the Origination Policy you have just created
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:
Go to SIP Domains
Click the blue plus button to add a new domain.
Create a SIP URI in this format:
{{subdomain}}.sip.twilio.com
E.g. didww-acmeltd.sip.twilio.com
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 Kong46.19.214.14 / 32 // DIDWW Singapore46.19.213.14 / 32 // DIDWW Miami46.19.212.14 / 32 // DIDWW Los Angeles46.19.210.14 / 32 // DIDWW Frankfurt46.19.209.14 / 32 // DIDWW New York185.238.173.14 / 32 // DIDWW Amsterdam46.19.208.0 / 21 // DIDWW RTP
Create credentials in the credential list per the inbound trunk in DIDWW
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.
Return to the BYOC trunk config page and select the SIP Domain you created above.
Set the primary and secondary call handler URLs as follows:
{{uri for your api’s webhooks}}
Set the Status Webhook URL as follows:
{{uri for your api status handler}}
Save the trunk.
Authorise the number as a CLI in Twilio using the Verified Caller ID workflow
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