bmj4330
11/21/2025, 6:53 PMAI Evy
11/21/2025, 6:53 PMAI Evy
11/21/2025, 6:53 PMAI Evy
11/21/2025, 6:53 PMsip:sip.retellai.com
You can specify the transport method by appending it to the URL :
- UDP: sip:sip.retellai.com;transport=udp
- TCP: sip:sip.retellai.com;transport=tcp
- TLS: sip:5t4n6j0wnrl.sip.livekit.cloud;transport=tls
After configuring your SIP trunk with your telephony provider, import the number into Retell AI and bind an inbound agent to it [(2) ]() .
## Method 2: Dial to SIP URI
If your provider doesn't support elastic SIP trunking, you'll need to use the Register Phone Call API to generate a call ID, then dial to [(3) ]() :
SIP URI: sip:{call_id}@sip.retellai.com [(1) ]()
Here's an example using a Twilio Function [(3) ]() :AI Evy
11/21/2025, 6:53 PMAI Evy
11/21/2025, 6:53 PMjavascript
const axios = require('axios') ;
exports.handler = async function(context, event, callback) {
const VoiceResponse = require('twilio') .twiml.VoiceResponse;
try {
const retellResp = await axios.post('<https://api.retellai.com/v2/register-phone-call',> {
agent_id: context.RETELL_AGENT_ID,
from_number: event.From,
to_number: event.To,
direction: 'inbound'
}, {
headers: { 'Authorization': `Bearer ${context.RETELL_API_KEY}` }
}) ;
const callId = retellResp.data.call_id;
const twiml = new VoiceResponse() ;
twiml.dial() .sip(`sip:${callId}@xxxxx.sip.livekit.cloud`) ;
return callback(null, twiml.toString() ) ;
} catch (err) {
console.log("Retell API error:", err.message, err.response?.data) ;
}
}
The elastic SIP trunking method is recommended as it's simpler and supports all Retell telephony features [(1) ]() .
**