https://retellai.com/?utm_source=discord&utm_medium=seo logo
Correct sip dial url
# ❓・bug-report
g
Hello, I'm trying to set up a custom telephony hook with Twillio. I'm trying to have a twilio function pick up and incoming call, check if the user has minutes left, and if so forwards to the retell agent. When I dial the SIP this seems to work as a sip url: sip:${toNumber}@5t4n6j0wnrl.sip.livekit.cloud;transport=tcp, but in the tutorial it says to create a call and use sip:${callId}@5t4n6j0wnrl.sip.livekit.cloud;transport=tcp. What is the difference?
c
I think ${toNumber} would be used when you are dialing a known number (which works fine if you are just forwarding a call to the Retell agent). You can use ${callId} when you want to establish a new call session dynamically and tie it to an active Twilio call.
g
Ah, got it. Here is a follow up question. Do you known of any examples of how to set up call transfer with sip dialing, the custom logic mentioned in the docs. I have a bit of a hard time understanding how I would set it up. I'm using Twilio webhooks