can i use TransferSIPParticipantRequest with a pho...
# ask-ai
i
can i use TransferSIPParticipantRequest with a phone number?
✅ 1
t
Thanks for reaching out, Ed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — regarding your question about using TransferSIPParticipantRequest with a phone number: Yes. TransferSIPParticipantRequest supports cold transfers via SIP REFER and can target a phone number (or SIP URI). The request sends a REFER to the participant’s endpoint, which forwards the call directly to the provided destination. Would you like an example request payload or guidance on formatting the phone number/SIP URI? Sources: Agents telephony integration | LiveKit Documentation | The Human-in-the-Loop (HITL) Pattern for Voice Agents | LiveKit, with interactive elements
i
give me an example of how to make a transfer request with a phone number
t
Below is a concise example of a TransferSIPParticipantRequest to transfer a SIP participant to a phone number. It shows the request payload and a short SDK-style snippet. Example JSON request payload:
Copy code
{
  "room": "support-room-123",
  "participant_sid": "PAxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "destination": "sip:+14155551234@provider.example.com",
  "transfer_type": "COLD"
}
Notes on formatting: • Destination can be a full SIP URI (recommended) or a tel-style URI. Examples: ◦ SIP URI:
sip:+14155551234@provider.example.com
◦ tel URI:
tel:+14155551234
• Use E.164 phone format (
+1XXXXXXXXXX
) for the phone number portion. •
transfer_type: "COLD"
indicates a cold transfer via SIP REFER (no warm handoff). Minimal SDK-style pseudocode (adjust to your SDK/language):
Copy code
const req = {
  room: "support-room-123",
  participant_sid: "PAxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  destination: "sip:+14155551234@provider.example.com",
  transfer_type: "COLD"
};

livekit.sip.transferSIPParticipant(req)
  .then(res => console.log("Transfer sent", res))
  .catch(err => console.error("Transfer failed", err));
Would you like this in a specific language or with headers/example HTTP endpoint for your API client? , with interactive elements
i
thats a transfer request to a sip endpoint is there a transfer request i can make to forward calls to another phone number?
t
You're asking if you can forward calls to another phone number (not just a SIP endpoint). Yes — LiveKit supports forwarding calls to a phone number by using a SIP REFER cold transfer or by creating an outbound SIP call to the phone number. In practice you provide the phone number as the transfer destination (a SIP URI or tel URI). Example JSON (phone-number destination):
Copy code
{
  "room": "support-room-123",
  "participant_sid": "PAxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "destination": "sip:+14155551234@provider.example.com",
  "transfer_type": "COLD"
}
Alternate destination formats: • SIP URI (recommended):
sip:+14155551234@provider.example.com
• tel URI:
tel:+14155551234
Use E.164 formatting for the phone number portion (
+1...
). You can also use
CreateSIPParticipant
with
sip_call_to
to place an outbound call to a phone number if you prefer creating a new SIP leg for warm-handoff flows. Would you like an HTTP example with headers or a snippet in a specific SDK/language? Sources: LiveKit Phone Numbers | Connect voice agents to phone lines | LiveKit | Agents telephony integration | LiveKit Documentation | The Handoff Pattern for Voice Agents That Replaces IVR Menus | LiveKit | The Human-in-the-Loop (HITL) Pattern for Voice Agents | LiveKit | Preserving Caller ID During SIP Transfers in LiveKit Agents, with interactive elements
i
is there a way to perform cold transfer when the original inbound call was not made with an elastic sip trunk
t
You're asking if you can perform a cold transfer when the inbound call did not arrive via an elastic SIP trunk. Yes — cold transfers are supported regardless of whether the inbound call used an "elastic" SIP trunk. LiveKit performs cold transfers by sending a SIP REFER (or by creating an outbound SIP leg to a phone number), so the key requirements are: • Your SIP provider/trunk must accept SIP REFER (or allow outbound calls to the target number). • If you need to preserve caller ID, set the appropriate `sip_number`/caller-id fields and ensure your provider permits caller ID passthrough. If you'd like, I can: • Provide a concrete HTTP request example for your setup, or • Show an SDK snippet in a specific language, or • Help verify whether your SIP provider supports REFER and caller-ID passthrough — tell me the provider or how the inbound call is connected. Sources: Agents telephony integration | LiveKit Documentation | LiveKit Phone Numbers | Connect voice agents to phone lines | LiveKit | The Human-in-the-Loop (HITL) Pattern for Voice Agents | LiveKit | Preserving Caller ID During SIP Transfers in LiveKit Agents | Introducing LiveKit Phone Numbers: zero to ringing in 60 seconds | LiveKit, with interactive elements
i
im using programmable voice, so a webhook, to route inbound calls from twilio to a webhook of mine, which then uses twiml to SIP the call over to my livekit SIP URI. from within that call i want to make a cold transfer, but its giving me a 403
t
Thanks — I’m looking into the 403 on your cold transfer from a Twilio-routed inbound call. Most likely causes: • The token used to initiate the transfer is missing SIP privileges (you need
SIPCall
or
SIPAdmin
grant). • Your SIP trunk/provider (Twilio) is blocking SIP REFER or outbound transfers. • Caller-ID/passthrough or trunk routing rules are preventing the outbound transfer. Can you share: 1. The exact TransferSIPParticipantRequest (redact secrets) or HTTP request you’re sending. 2. How the access token is created (which grants/scopes you include). 3. Any Twilio SIP trunk settings or error logs showing the 403 (Twilio or LiveKit logs). If you prefer, I can show an example token creation with
SIPCall
and a sample HTTP transfer request once you confirm which language or client you’re using. , with interactive elements