I have created an agent whose only directive is to transfer calls out. When I call into a number I purchased through retell, the call transfers normally. However, when I call into any custom SIP number, the transfer fails saying the other side refused the call.
I have tried updating the outbound transfer protocol between UDP and TCP as well as updating the SIP verb to both REFER and INVITE with no difference in results. How can I transfer calls out that came in on a custom SIP trunk?
The issue you’re experiencing is related to how custom SIP trunking handles call transfers. The method you use to connect your custom SIP number determines whether call transfer functionality is available.(1)
Two Custom Telephony Methods
Retell AI supports two methods for custom telephony:(1)
Dial to SIP URI - Does NOT support Retell’s transfer call feature(1)
The Core Problem
When using the “dial to SIP URI” method, you cannot utilize Retell’s transfer call feature because Retell does not have access and control over the telephony provider and number, and cannot initiate transfer for you.(1)(2)
All traffic appears as inbound to Retell when using this method, so it’s up to your system to specify the call direction.(1)
Solution Options
Option 1: Switch to Elastic SIP Trunking (Recommended)
Configure elastic SIP trunking with your telephony provider.(1) When using this method, all telephony functionalities supported by Retell numbers will also be supported, assuming your telephony provider supports it.(1)
One user confirmed this approach works: “Finally it is working fine the Elastic sip trunking.. I configured one extension credentials we are able to do transfer incoming and outgoing.”(2)
Option 2: Implement Custom Transfer Logic
If you must continue using the dial to SIP URI method, you will need to implement your own transfer logic using a custom function that internally interacts with your telephony provider to transfer the call.(1)(2)
Troubleshooting Transfer Failures
If you’re using elastic SIP trunking and still experiencing failures, check:(3)
Telephony issues - Call transfer failures occur for similar reasons as outbound call failures. The SIP connection log is available in the call logs.(3)
Trunking settings - Verify your termination settings in your SIP trunking provider and ensure you provide the right termination URL to Retell.(1)
Check the logs in your telephony provider for more details on the failure reason.(1)
I don’t have information about a specific call or its call ID from your message.
To retrieve a call ID in Retell AI, you can use the Get Call endpoint(1) or List Calls endpoint(2). The call ID is a unique identifier for each call(1)(2).
If you’re looking for a specific call, you can:
Retrieve a specific call using client.call.retrieve(call_id)(3) where you provide the call_id
List all calls using client.call.list()(3) to see multiple calls and their IDs
The call ID format looks like: "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6"(1)(2)
Could you provide more context about which call you’re referring to, or share any details that would help identify it?
Any insight on call id call_382a5faaa08f9401cfd290daaaf or this issue in general? It seems something about Retell’s custom SIP support is causing an issue for others as well when transferring out. I even set up a Telnyx number via custom SIP and the call will transfer into Retell but not out.
Yes, you can configure the caller ID to display the Retell Agent’s number instead of the user’s number during call transfers(1)(2).
When setting up call transfers in Retell AI, you have two options for the displayed caller ID(1)(2):
Retell Agent’s number: The transfer destination will see the Retell agent’s number(1)(2)
User’s Number: The transfer destination will see the number of the user(1)(2)
To use the Retell Agent’s number, simply select that option in the caller ID configuration when setting up your transfer call function or call transfer node(1)(2).
Note that when using the user’s number option, your telephony provider must support caller ID override for this feature to work(1)(2). For warm transfers, this uses SIP DIAL with from and P-Asserted-Identity headers set to the user’s number(1)(2). For cold transfers, it uses SIP REFER, and it’s up to the telephony provider to support caller ID override for SIP REFER(1)(2).
Retell Twilio numbers support showing the user’s number on both warm and cold transfers, while Retell Telnyx numbers only support this when using SIP REFER via cold transfer(1)(2). If caller ID override is not supported, the transfer would fail(1)(2).
I have pinpointed the issue: Retell expects my SIP switch to handle the transfer in a web socket similar to the way Twilio or Telnyx would handle this. As I am able to send calls via SIP to retell numbers I purchase from my switch, I will simply use Retell numbers for the time being.