wooden-librarian-60399
03/06/2026, 5:52 PMtall-airline-16756
03/06/2026, 5:53 PMtall-airline-16756
03/06/2026, 5:53 PMcreate_sip_participant while preserving the inbound caller’s ID (from a Twilio call token).
Short answer
• Yes. You can place outbound PSTN calls from a LiveKit room using create_sip_participant and route the outbound leg through Twilio’s SIP trunking (i.e., Twilio as your SIP provider) rather than requiring an “Elastic SIP Trunk.”
• You can pass the inbound caller’s number as the outbound caller ID by setting the sip_number (caller ID/ANI) in the CreateSIPParticipantRequest, provided Twilio accepts that caller ID for your trunk configuration and the number meets Twilio’s policies.
How this typically works
1. Capture the inbound caller’s number from the incoming SIP leg (the From: or ANI on the inbound call).
2. Call LiveKit’s create_sip_participant for the room, specifying:
◦ the Twilio-connected SIP trunk (configured in LiveKit),
◦ the destination PSTN number to dial (sip_call_to or equivalent),
◦ and sip_number set to the original inbound caller’s number so the outbound leg presents that caller ID.
1. Twilio’s trunk receives the SIP call from LiveKit and routes to the PSTN. Twilio will honor the From: / ANI if your trunk settings allow caller-ID pass-through and the number is permitted by Twilio.
Important constraints and setup notes
• Twilio authentication: Twilio trunks typically expect SIP credentials or IP ACL-based authentication; LiveKit needs to be configured to authenticate to the Twilio trunk. Twilio call tokens (used in some Twilio SDK flows) are not directly part of SIP signaling—SIP routing uses trunk auth and headers.
• Caller ID acceptance: Twilio must allow caller-ID passthrough for your trunk. You may need to enable caller ID transfer/passthrough in your Twilio trunk settings and ensure the number you want to present is permitted/verified under Twilio rules.
• SIP headers to set: Use From: and/or P-Asserted-Identity as appropriate. Setting sip_number in the CreateSIPParticipantRequest instructs LiveKit to populate the outbound SIP caller ID.
• Compliance: Twilio may block arbitrary spoofing; the number used as caller ID may need verification or specific trunk/policy settings.
Next steps I can help with
• If you want, share which fields you currently see in your create_sip_participant request (room name, trunk ID, fields you can set). I can give a concrete example request for your code language.
• If you’re using Twilio trunks and want the exact Twilio settings to enable caller-ID passthrough, tell me whether your trunk uses SIP credential auth or IP ACLs and I’ll outline the settings to check.
• If you prefer, I can draft a sample create_sip_participant call showing where to put sip_number and the dial target.
Would you like a code example in Python or JavaScript for create_sip_participant with sip_number filled in?
Sources: SIP Lifecycle Management Agent | LiveKit Documentation | Outbound Calling Script | LiveKit Documentation | Agents telephony integration | LiveKit Documentation | Preserving Caller ID During SIP Transfers in LiveKit Agents | Preserve caller ID during SIP transfers with Twilio | LiveKitwooden-librarian-60399
03/06/2026, 5:56 PMtall-airline-16756
03/06/2026, 5:56 PMcreate_sip_participant (or something similar) to dial outbound to the PSTN from a LiveKit room without any SIP trunk at all, and instead go straight to a programmable voice app (e.g., Twilio Programmable Voice).
Short answer
• No — you cannot bypass a SIP endpoint/trunk entirely when using LiveKit’s SIP participant functionality. LiveKit’s outbound PSTN dialing uses SIP signaling, so you need a SIP target for the outbound leg. That means either a SIP trunk (Twilio SIP trunk, a carrier SIP provider, or your own SIP gateway) or a SIP-capable endpoint that the programmable voice app can accept.
• You can, however, use Twilio Programmable Voice in combination with SIP (Twilio acting as the SIP target) rather than an “Elastic SIP Trunk” product specifically — Twilio can act as a SIP provider/trunk that LiveKit dials into. This effectively uses Twilio (programmable voice) for PSTN routing while still sending/receiving SIP from LiveKit.
Why a SIP trunk/endpoint is required
• LiveKit creates an outbound SIP leg when you call create_sip_participant. That API expects to send SIP to some SIP destination. Programmable voice apps like Twilio accept and route calls via SIP trunks or SIP interfaces — LiveKit needs to send SIP to Twilio’s SIP interface to reach Twilio’s PSTN routing.
• Twilio’s client-side call tokens (e.g., a Twilio Call Token used in Twilio SDKs) are not a SIP target by themselves; they’re credentials for Twilio SDK flows. SIP signaling is the protocol LiveKit speaks for telephony participants.
Practical options
• Use Twilio as the SIP target/trunk:
◦ Configure a Twilio SIP trunk or SIP domain to accept calls from LiveKit (via IP ACL or SIP credentials).
◦ Call create_sip_participant in LiveKit pointing at that Twilio SIP trunk and set sip_number to present caller ID as needed.
◦ This uses Twilio Programmable Voice for PSTN without needing a separate “Elastic SIP Trunk” product.
• Use another SIP gateway or provider:
◦ Point LiveKit at any SIP-capable gateway/service that will route to the PSTN.
• Run your own SIP gateway:
◦ If you want more control, run a lightweight SIP gateway that accepts LiveKit’s SIP and then uses the programmable voice app’s REST APIs or SDKs to place outbound PSTN calls. Note: this reintroduces a SIP-to-API bridge you must operate.
• Peer with a Twilio SIP interface that accepts SIP INVITE and then Twilio handles the PSTN leg — this is functionally equivalent to using Twilio as your SIP trunk.
If you want to avoid any SIP at all (no SIP trunk, no SIP gateway), LiveKit doesn’t provide a native direct-to-Twilio-Programmable-Voice REST flow for outbound PSTN. You would need a bridging component that translates LiveKit’s SIP into the programmable voice app’s API calls.
Would you like:
• A concrete example showing the create_sip_participant fields you’d set to point at a Twilio SIP trunk?
• Guidance on configuring Twilio (SIP domain/trunk) to accept LiveKit calls (IP ACL vs credentials, caller ID passthrough)?
• A sample architecture for a lightweight SIP->Twilio-API gateway if you prefer not to use Twilio’s SIP trunking?