Programmatic transfer

I am trying to use a standard tool to transfer. The setup we have is Twilio > Retell via sip trunking. Pretty standard I guess. I am trying to create a tool that is not retell’s native transfer to tool but custom one. However I cannot find the call in twilio until it is over. Nor I can use twiml to transfer the call using the Twilio sid that is in the call. Not sure this is for feature request or there is already a way to do that.

Based on the available sources, when using Twilio with Retell via SIP trunking, the Twilio call SID is available in the call object under the telephony_identifier field(1). This field is populated when available and contains the twilio_call_sid(1).

However, the sources indicate that for custom transfer implementations, you would need to handle the integration with your telephony provider through code(2). When using elastic SIP trunking (your setup), Retell does not directly control the telephony provider, which limits what you can do with the native Twilio APIs during an active call(2).

From the webhook documentation, the telephony_identifier with the Twilio call SID becomes available in webhook events like call_started, call_ended, and call_analyzed(3). The call_started webhook is triggered when a new call begins and includes basic call information(3), while call_ended is triggered when a call completes, transfers, or encounters an error(3).

One community member mentioned they “created the transfer function separately from Retell as a custom function” when dealing with similar requirements(4). This suggests implementing your own transfer logic as a custom function might be necessary for your use case.

If you need real-time access to the Twilio call SID during an active call to use TwiML for transfer, this appears to be a limitation of the current architecture when using SIP trunking. The sources don’t provide a documented way to access the Twilio call SID mid-call for custom TwiML manipulation.

For your specific need to find and manipulate the Twilio call using TwiML during an active call, this may indeed be a feature request, as the current documentation doesn’t show a method to access the Twilio SID in real-time before the call ends.