Skip to main content
Connect a Telnyx number to Retell with elastic SIP trunking, so your agents can make and receive calls on numbers you own in Telnyx. Create an FQDN trunk, configure routing and codecs, set up outbound auth, then import the number into Retell.
1

Create elastic SIP trunking

  1. Create the trunk, select FQDN as the type, and give it a name.
  1. Add FQDN
Add the FQDN of Retell’s SIP server: sip.retellai.com. Select SRV as the DNS record type.
  1. Set up outbound calls authentication
Select credentials as the authentication method, and add the username and password. You will need to use this username and password when importing the number to Retell.
Telnyx requires the header X-Telnyx-Username: <username> to be included in the outbound calls when using credentials as the authentication mechanism. See Telnyx documentation for more details. You can find details on adding custom SIP headers, or on the Make outbound calls page.
  1. Set up inbound setting
  • Select +E.164 as the number format.
  • Select G722, G711U, G711A as the codecs.
  • Select TCP as the transport method. (TCP is recommended over UDP for reliability.)
  • Select your SIP region.
  1. Set up outbound setting
Create a new outbound voice profileAnd select that in the outbound setting
2

Move numbers to elastic SIP trunking

You’ve created the elastic SIP trunk. Now purchase numbers or move existing numbers to this trunk.
3

Import numbers to Retell

Now that the number is set up with your elastic SIP trunk, import it to Retell so we know how to route the call.Here you will supply Telnyx’s FQDN as the termination SIP URI. You can find your FQDN based on your choice of SIP region in this doc (e.g. sip.telnyx.com). You will also need to supply the username, password and any additional SIP headers you set up earlier in the outbound authentication as well.You can also import numbers programmatically via Import Number API.Now that the number is imported, you can make and receive calls with it just like a number purchased from Retell. It shows up in your dashboard, and you can make phone calls from the dashboard directly. You can also use the Create Phone Call API to create calls programmatically. To have Retell stop using this number, delete it from the dashboard or via the Delete Number API.

Troubleshooting

If an inbound call fails, check the FQDN and inbound settings on your Telnyx trunk. If an outbound call fails, check the termination FQDN, credentials, and the X-Telnyx-Username header you supplied to Retell. See Debug outbound call for common SIP failures, or debug SIP calls with PCAP files to inspect the signaling in Wireshark.