Documentation Index
Fetch the complete documentation index at: https://docs.retellai.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
In this guide, we will show how to integrate Retell agents with your telephony providers and use your numbers. Please note that this is independent of the agent type you are using. We will provide two ways to integrate with your telephony provider:- Elastic SIP trunking: This is the recommended way to integrate with your telephony provider that supports elastic SIP trunking. You will need to set up a SIP trunking and configure your number to point to it, and then import that number to Retell.
- Dial to SIP URI: If your telephony provider does not support elastic SIP trunking, or you have more complicated telephony setup that cannot use elastic SIP trunking, you can dial the call to a specific SIP uri.
- Retell SIP server uri:
sip:sip.retellai.com - IP block for traffic:
18.98.16.120/30(All regions),143.223.88.0/21(certain United States traffic),161.115.160.0/19(certain United States traffic)
- TCP (Recommended)
- UDP
- TLS
- mTLS (Learn more)
- For TCP, the sip server url needs to be
sip:sip.retellai.com;transport=tcp - For UDP, the sip server url needs to be
sip:sip.retellai.com;transport=udp - For TLS, the sip server url needs to be
sip:sip.retellai.com;transport=tls
- SRTP (Transport should be set to TLS to use SRTP)
- PCMU
- PCMA
- G.722(HD)
Method 1: Elastic SIP trunking (Recommended)
Elastic SIP Trunking is a service offered by cloud communications platforms that enables organizations to connect their existing PBX (Private Branch Exchange) or VoIP (Voice over IP) infrastructure to the Public Switched Telephone Network (PSTN) over the internet using the SIP (Session Initiation Protocol). In this context, the elastic SIP trunking is used to connect Retell’s VoIP with PSTN so that your agents can make and receive calls. When using this method, all the telephony functionalities that are supported by Retell numbers will also be supported here, assuming that your telephony provider supports it. SIP trunking is a popular service offered by many telephony providers, so most likely your telephony provider would be able to support this. Here’re detailed guides for some telephony providers: Other telephony providers that support SIP trunks are also supported, feel free to use these guides as a reference.FAQ
Will it throw errors if the details or configuration is incorrect?
Will it throw errors if the details or configuration is incorrect?
My inbound call is not connecting, what should I do?
My inbound call is not connecting, what should I do?
My outbound call is not connecting, what should I do?
My outbound call is not connecting, what should I do?
Will I be able to transfer call using SIP trunking?
Will I be able to transfer call using SIP trunking?
Will I be able to press digit using SIP trunking?
Will I be able to press digit using SIP trunking?
Can I view and manage the numbers I import using SIP trunking?
Can I view and manage the numbers I import using SIP trunking?
I need to change the configuration of the imported number, how can I do that?
I need to change the configuration of the imported number, how can I do that?
Method 2: Dial to SIP URI
If your telephony provider does not support elastic SIP trunking, or you have more complicated telephony setup that cannot use elastic SIP trunking, you can use this method. When using this method, Retell does not directly make or receive calls, but instead relies on your system to dial the call to the respective SIP URI. This would require you to have some codes to handle integration with your telephony provider. All traffic looks like inbound to Retell in this case, so it’s up to you to specify the call direction. Here we assume you already have your call handling setup. For Retell to know what agent to use to handle the call, and for you to obtain SIP URI to use for this call, you would call the Register Phone Call API. You will get acall_id back from this API, and you would use it to piece
together the SIP URI.
sip:{call_id}@sip.retellai.comExample Code
Here’s an overly simplified example code to handle the inbound call webhook from Twilio and dialing the call to the SIP URI.FAQ
How to transfer call/end call using dial to SIP method?
How to transfer call/end call using dial to SIP method?
Will I be able to press digit using dial to SIP method?
Will I be able to press digit using dial to SIP method?
Two entries created for a single dial?
Two entries created for a single dial?
Can I use telephony provider's other features like AMD detection using this method?
Can I use telephony provider's other features like AMD detection using this method?
Security Center
Retell is built on enterprise-grade security to protect your voice communications. We recommend using TLS 1.2 or higher to secure all SIP signaling channels between your infrastructure and Retell’s SIP servers. To establish a secure TLS connection with Retell’s SIP server, you may need to add Retell’s server-side root CA to your trust store. You can download it here.Mutual TLS (mTLS)
Mutual TLS (mTLS) is an extension of the standard TLS protocol that provides two-way authentication between a client and a server. Unlike standard TLS — where only the server presents a certificate to prove its identity to the client — mTLS requires both sides to present and verify certificates. This ensures that only trusted, authenticated parties can establish a connection, significantly reducing the risk of man-in-the-middle attacks and unauthorized access. In a typical TLS handshake:- The server presents its certificate to the client.
- The client verifies the server’s certificate and the connection is established.
- The server presents its certificate to the client.
- The client also presents its certificate to the server.
- Both parties verify each other’s certificates before the connection is established.
Video Tutorials
Elastic SIP Trunking
Dial to SIP URI
Telephony Partners
In certain scenarios, you might need to manipulate the SIP call flow, or have some custom needs that are not directly supported by Retell, you can check out our telephony partners to see if they can help you.- Jambonz: Jambonz is a SIP server that supports static IP address and can be used to connect to Retell’s SIP server to manipulate the SIP call flow. Dedicated slack support channel is available for Retell users.
- Cloudonix: Cloudonix is a CPaaS that can be connected to Retell’s SIP server to manipulate the SIP call flow.