SIP Trunking: How to Keep Your Existing Phone Number
SIP trunking lets you keep your existing phone number and route its calls to Retell AI. Set up origination, import the number, and test it on Twilio or Telnyx.
SIP trunking lets you keep your existing business phone number with the carrier you already use and route its calls to a voice agent over the internet, so nothing about the number changes for your customers. With Retell AI, you point your carrier's SIP trunk at Retell's SIP server, import the number into the Retell dashboard, and bind an agent to it. You do not port the number, and the carrier keeps billing you for it as before.
Retell supports two methods. Elastic SIP trunking is the recommended one and works with most carriers. Dial to SIP URI is the fallback for carriers or phone systems that cannot do elastic trunking.
What is SIP trunking, and how does it keep your number?
SIP (Session Initiation Protocol) is the signaling standard most internet phone systems use to set up and end calls. A SIP trunk is a virtual line between your carrier and another system. Your number stays assigned to your carrier; the trunk decides where calls to that number go.
A trunk has two directions, configured in two places:
- Origination (inbound): calls flowing from your carrier into Retell. In your carrier's trunk settings, set the origination SIP URI to Retell's SIP server, sip:sip.retellai.com.
- Termination (outbound): calls flowing from Retell out through your carrier. Your carrier gives you a termination SIP URI for the trunk, and you enter it in Retell when you import the number.
Retell has no termination URI of its own. sip:sip.retellai.com is its only SIP address, and it is used on your carrier's side as the origination target.
SIP trunking vs porting vs a new Retell number
You have three ways to put an agent on a phone line. The right one depends on whether you want to keep your carrier relationship.
- Elastic SIP trunking: Where the number lives: Stays with your carrier. Best when: You want to keep the number, carrier and rates.
- Dial to SIP URI: Where the number lives: Stays in your own phone system. Best when: Your carrier cannot do elastic trunking.
- Port the number: Where the number lives: Moves to a new carrier. Best when: You are changing carriers anyway.
- Retell-managed number: Where the number lives: Bought in Retell (US and Canada). Best when: You need a new number quickly.
On cost, the Retell pricing page lists no charge for SIP trunking or custom telephony and no charge for custom phone numbers, so Retell's telephony line drops out and your carrier bills you directly. A Retell-managed number is $2.00 per month, plus Retell's per-minute telephony rate for the destination country. Voice agent usage itself is billed per minute either way, from $0.07 to $0.31 per minute on the pay-as-you-go plan.
Point your carrier's SIP trunk at Retell
Before you import anything, make sure your carrier's trunk can reach Retell and accept traffic back from it. Most carriers require you to allowlist the far end.
- Set the trunk's origination URI to sip:sip.retellai.com
- Allowlist signaling from 18.98.16.120/30
- Allowlist 3.42.144.0/23 and 153.57.128.0/18 (all regions)
- Allowlist 143.223.88.0/21 and 161.115.160.0/19 (certain US traffic)
- Open RTP/RTCP on UDP ports 10000 to 65535
- Offer the PCMU, PCMA or G.722 codec
- Note your termination URI and any trunk username and password
Retell supports TCP (recommended), UDP, TLS and mTLS. To force a transport on inbound calls, append it to the URI, for example sip:sip.retellai.com;transport=tcp. Media encryption with SRTP requires TLS transport. mTLS is configured on request through Retell support. The custom telephony docs list the current IP blocks and supported SRTP crypto suites.
Import the number into Retell and test the connection
In the Retell dashboard, open Phone Numbers, click +, and choose Connect to your number via SIP trunking. Enter:
- The phone number in E.164 format.
- Your carrier's Termination URI.
- Outbound Transport.
- SIP Trunk User Name and SIP Trunk Password, if your carrier uses credential authentication instead of an IP allowlist.
Click Test SIP Connection before saving. Retell sends a SIP OPTIONS request to your termination URI without placing a call. A 401 or 407 means the credentials are missing or wrong, a 403 usually means your carrier's IP allowlist is blocking Retell, and no response points to the host, port, transport or a firewall.
A passing SIP test does not prove calls work. Test SIP Connection only checks that your termination URI answers an OPTIONS request. Place a real inbound call and a real outbound call before you move production numbers.
Click Save, then bind an inbound agent, an outbound agent or both. A number only takes calls in a direction once an agent is bound to it. You can also import numbers programmatically through the Import Number API.
Setup notes for Twilio, Telnyx and Vonage
The pattern is the same everywhere, but each carrier names things differently:
- Twilio: create an Elastic SIP Trunk, use a localized termination URI near your region (format: your-trunk-domain.pstn.edge.twilio.com, for example my-retell-trunk.pstn.ashburn.twilio.com), allowlist 18.98.16.120/30 or add credentials, and set origination to sip:sip.retellai.com. To dial abroad, enable the country under Voice Geographic Permissions for Elastic SIP Trunking.
- Telnyx: create an FQDN trunk pointing at sip.retellai.com with an SRV record, use credential authentication, choose +E.164 number format, the G722, G711U and G711A codecs, and TCP. Telnyx requires an X-Telnyx-Username header on outbound calls, which you add as a custom SIP header in Retell.
- Vonage: in the SIP section choose "Something else" as the provider type, note the termination URI, username and password, and set origination to sip.retellai.com.
Running a contact center platform instead of a plain carrier? Retell documents dedicated paths for Five9, Genesys Cloud, Avaya and Amazon Connect. Five9 uses a pre-built trunk, and you import the pseudo number Five9 provisions, not the customer-facing number.
What if your carrier cannot do elastic SIP trunking?
Use the dial to SIP URI method. Your own system receives the call, calls Retell's Register Phone Call API to get a call ID, and dials the call to sip:{call_id}@sip.retellai.com. The dial must happen within 5 minutes of registering, or the call disconnects with a registered_call_timeout reason.
The trade-off is control. Retell cannot transfer or end the call on your carrier, because it never sees the number, so you build transfers yourself and trigger them with a custom function. The per-number inbound webhook also does not apply, since you pass call context when you register the call.
Keep transfers and caller context working over the trunk
Transfers work over an elastic SIP trunk. For a cold transfer using SIP REFER, your carrier must allow SIP REFER and PSTN transfer on the trunk; on Twilio this is a trunk setting. How call transfers work between voice agents and human teams explains when to use cold or warm transfers.
Your phone system can also pass context in. Retell turns inbound SIP headers starting with X-, plus Diversion, History-Info, User-to-User and P-Asserted-Identity, into dynamic variables the agent can use. For per-call decisions, set an Inbound Webhook URL on the number to choose the agent or set variables before the call connects. If all concurrency slots are busy for about 40 seconds, Retell forwards the call to the number's fallback number when one is set.
Once calls are flowing on your own number, the agent can greet callers from your CRM; see how to connect Retell AI to HubSpot. A common first deployment is an AI answering service on the main line customers already know.
Set up a test number on your trunk first, then move production numbers once inbound and outbound calls both check out. Open the Retell dashboard to import your first number.





