Steps
1
Create Elastic SIP Trunking
- Create the trunk, give it a name, and toggle some general settings

- Setup termination (this is for outbound)
- the termination SIP URI here is important, we would use it in later steps. You might want to use a localized termination uri that’s near your region. You can expand and view your localized uris in the twilio console.

- For your elastic SIP trunk to accept our outbound request, you need to whitelist
IP address or create a auth with username and password.
- If you opt for the auth route, you need to specify the username and password in the next step when importing the number to Retell.
- Currently Retell 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 like following:
- Setup origination (this is for inbound)
- Here you will specify Retell’s SIP server address as the origination SIP URI:
sip:5t4n6j0wnrl.sip.livekit.cloud
.

2
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.

3
Import numbers to Retell
Now the number is set up with your elastic SIP trunking, you need to
import the number to Retell so that we will know how to route the call.
Here you will supply the termination SIP URI you set up in Step 1. If you have set up
auth via credentials, you will need to supply the username and password as well.
You can also import number programmatically via Import Number API.Now the number is imported, you can make and receive calls with this number just like a number
you purchased from Retell — it will show up in your dashboard, and you can make phone calls from
Dashboard directly. You can also use the Create Phone Call API
to create calls programmatically.
If you wish to Retell to stop using this number, you can delete it from the dashboard or via
the Delete Number API.


Common Issues
1. After connecting, inbound works but outbound does not work?- Check your Termination SIP URI If there’s a space in it, please remove. Also you should use a localized termination uri that’s near your region. Check out this doc to select one.
- Check your user name and credentials Please make sure you entered the right user name and credentials which shows in this dialog. Please note the user name is not the friendly name that shows in the credential list. The friendly is different to user name, you need to double check if you happen to give a different name.

-
Search “geo” to find the “Voice Geographic Permissions” setting.
-
Choose “Elastic Sip Trunking” in selector, and select the countries you would like to dial.
Phone Number Masking
If you have a personal phone number or a trusted business number you would like to display to the callee, verified phone numbers can be imported into Twilio to serve as the caller ID.Add a Caller ID
- Go to the Verified Caller IDs page
- Click Add a new Caller ID
- Enter the desired phone number to verify, select the desired verification method, and then click Verify Number

- The number entered will receive an OTP Authentication code for verification. Enter this verification code on the next window.

- Once you click Submit, if the correct OTP code was entered, you will receive a Successful notification and the number will be added to your account as a verified caller ID.
Configure SIP Header Rules to Display Caller ID
- In the Twilio Console, navigate to Elastic SIP Trunking → Trunks → [your trunk] → Termination
- Scroll down to Header Manipulation and open View all SIP header manipulation policies

- Click on Create a policy in the top right and give your policy a friendly name
- Click on + Add request rule and give the rule a friendly name
- Under the Actions section, set the following values:
- SIP header field: From number
- Action: Replace with
- Value: Your caller ID in E.164 format (e.g. +18881230987)

- Click Add rule, and then click Save policy
- Return to the Termination tab within your trunk, and select the new header manipulation policy from the dropdown
- Now, any number imported from this Twilio trunk into your Retell account will use your verified caller ID. Place an outbound test call to validate the changes.
- Note: You will at least one number purchased from Twilio in your SIP trunk in order for the caller ID to be applied