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.

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.

- Click on the Plus button to create a new Credentials List.

- You can create a new Credentials List.

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/13. Setup origination (this is for inbound)
- Here you will specify Oration AI’s SIP server address as the origination SIP URI:


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.

5. Import numbers to Oration AI
Now the number is imported, make note of three things:- 
The termination SIP URI you set up in Step 1. It usually ends with .pstn.twilio.com.
- The username and password you set up in Step 1.
- 
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
 
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.

2. How do I set up dialing to international countries?
Search and find the “Voice Geographic Permissions” setting in Twilio.
