https://retellai.com/?utm_source=discord&utm_medium=seo logo
Walk me through setting up a Twilio SIP trunk suit...
# ❓・ai-evy-support
c
@AI Evy Walk me through setting up a Twilio SIP trunk suitable for inbound & outbound calls with Retell.
a
Thanks for tagging me @cryingarmadillo. I'll look through relevant sources and get back to you shortly.
### Answer Here's how to set up a Twilio SIP trunk for inbound and outbound calls with Retell AI: ## Step 1: Create Elastic SIP Trunking in Twilio First, create the trunk and give it a name with general settings [(1) ]() . Then configure termination for outbound calls - the termination SIP URI is important as you'll use it later . Use a localized termination URI near your region by expanding and viewing localized URIs in the Twilio console . For your elastic SIP trunk to accept outbound requests, whitelist IP addresses or create authentication with username and password . Since Retell's SIP server doesn't have a static IP, credential-based authentication is recommended . You'll need to whitelist all IP addresses in the range if choosing the IP route . Next, set up origination for inbound calls by specifying Retell's SIP server address as the origination SIP URI:
sip:5t4n6j0wnrl.sip.livekit.cloud
. ## Step 2: Move Numbers to Elastic SIP Trunking Purchase numbers or move existing numbers to your newly created elastic SIP trunk . ## Step 3: Import Numbers to Retell Import the number to Retell so the system knows how to route calls . Supply the termination SIP URI from Step 1 . If you configured authentication via credentials, provide the username and password . You can also import numbers programmatically via the Import Number API . Once imported, the number appears in your dashboard and works like any Retell-purchased number for making and receiving calls . ## Configuration Best Practices Set up termination and origination URIs correctly to route calls through Retell AI's SIP server [(2) ]() . Implement appropriate authentication methods such as credentials or IP whitelisting to secure your SIP trunk . Import phone numbers in E.164
format (country code followed by number without spaces or special characters) . During import, provide the termination URI to identify your elastic SIP trunk for outbound calls . ## Common Troubleshooting If inbound works but outbound doesn't, check your termination SIP URI and remove any spaces [(1) ]() . Use a localized termination URI near your region . Verify your username and credentials match exactly what's shown in the credential list dialog . For international dialing, search "geo" to find "Voice Geographic Permissions" settings, choose "Elastic Sip Trunking" and select countries you want to dial .
​ To learn more, see the sources I considered: [[1] Twilio](https://docs.retellai.com/deploy/twilio) [[2] AI in SIP Calling & Telephony Solutions | Retell AI](https://www.retellai.com/blog/integrating-ai-with-sip-trunking-and-modern-telephony) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.