Skip to main content

Steps to Create Elastic SIP Trunking in Twilio

1. Create the trunk, give it a name, and toggle some general settings

  • Search and find the “Elastic SIP Trunking” in the console. Click on the “Create Trunk” button. Remember to keep saving the changes after each step.
Twilio Trunk Creation

2. Setup termination (this is for outbound)

The termination SIP URI here is important, we would use it in later steps. For your elastic SIP trunk to accept our outbound request, you need to whitelist IP address or create a auth with username and password.
  • Click on Termination in the left sidebar.
Twilio Termination Setup For authenticating, we recommend using a username and password.
  • Click on the Plus button to create a new Credentials List.
Twilio Credentials List
  • You can create a new Credentials List.
Twilio Credentials List Form
If you opt for the auth route, you need to specify the username and password in the next step when importing the number to Oration AI.
Currently Oration AI SIP server does not have a static IP, so if you opt for the IP route, you need to whitelist all the IP addresses in the range. 0.0.0.0/1 and 128.0.0.0/1

3. Setup origination (this is for inbound)

  • Here you will specify Oration AI’s SIP server address as the origination SIP URI:
sip:d4x9uouf0s0.sip.livekit.cloud
Twilio Origination Setup You should be able to see the origination URI in the console. Twilio Origination SIP URI List

4. Move numbers to Elastic SIP Trunking

You’ve created the elastic SIP trunk, now you would need to purchase numbers / move existing numbers to this trunk. Now the number is set up with your elastic SIP trunking, you need to import the number to Oration AI so that we will know how to route the call. Click on the add number button in the top left of the dashboard. Add Number Once number import is complete, your number will show up in the list of numbers. Number Addition Complete

5. Import numbers to Oration AI

Now the number is imported, make note of three things:
  1. The termination SIP URI you set up in Step 1. It usually ends with .pstn.twilio.com.
  2. The username and password you set up in Step 1.
  3. The IP range of your SIP provider (twilio) to whitelist. This is required for inbound calls received on your SIP-based phone numbers. We have gone through Twilio’s documentation to get the list of IP ranges. There are as follows:
    • 54.172.60.0/30
    • 54.244.51.0/30
    • 54.171.127.192/30
    • 35.156.191.128/30
    • 54.65.63.192/30
    • 54.169.127.128/30
    • 54.252.254.64/30
    • 177.71.206.192/30
    • 168.86.128.0/18
You can now follow the steps in the Phone Numbers guide to import the number to Oration AI.

Troubleshooting

1. After connecting, inbound works but outbound does not work?

Check the termination SIP URI Make sure there is no space in it and that it ends with .pstn.twilio.com. Check the user name and credentials Please ensure you entered the correct user name and credentials which are shown in this dialog. Please note that the user name is different from the friendly name that appears in the credential list. Double check if you happen to give a different name. Twilio Credentials List Form

2. How do I set up dialing to international countries?

Search and find the “Voice Geographic Permissions” setting in Twilio. Twilio Geo Permissions Choose “Elastic Sip Trunking” in selector, and select the countries you would like to dial. Twilio Elastic SIP Selector