rapid-honey-43838
02/25/2026, 3:58 PMtall-airline-16756
02/25/2026, 3:58 PMtall-airline-16756
02/25/2026, 3:58 PMsip:anything@<trunk-id>.sip.livekit.cloud with username/password.
Short answer: No — LiveKit does not support dialing a trunk by placing the trunk ID into the SIP URI.
Why, and what to do instead:
• LiveKit’s SIP endpoints are project/region level (for example your-project.region.sip.livekit.cloud or {project_id}.{region}.sip.livekit.cloud). Those domains are used to route calls for your project and region.
• Trunks are authenticated and established using shared credentials (e.g., auth_username / auth_password or allowed IP addresses) on a per-trunk basis. Your SIP provider or PBX authenticates to the LiveKit SIP service using those credentials to set up the trunk connection.
• Incoming calls are routed trunk-to-room using dispatch rules configured for that trunk. You do not dial a trunk by using its internal trunk-id in the SIP URI.
If your goal is one of the following, I can help with concrete next steps:
• Configure an inbound trunk from your SIP provider to LiveKit (I can list the required fields and example credentials format).
• Route inbound calls to specific rooms using dispatch rules (tell me how you want calls routed and I’ll outline the rule setup).
• Set up outbound calling via a trunk (I can explain the authentication and call flow required).
Which of the above are you trying to accomplish, or can you share the SIP provider / PBX you’ll be using? That will help me give exact configuration examples.
Sources: Support data sovereignty in India | LiveKit | sip | livekit/livekit_composite | DeepWikirapid-honey-43838
02/26/2026, 11:16 PMtall-airline-16756
02/26/2026, 11:17 PMauth_username and auth_password (or with allowed addresses). Your SIP provider or PBX uses those credentials to authenticate and establish the trunk connection to LiveKit.
• Once the trunk is established and authenticated, LiveKit uses the trunk’s dispatch rules to route calls (trunk-to-room). You do not authenticate per-INVITE by embedding username/password in the SIP URI to reach a trunk ID.
If you want, I can help with:
• Steps and example fields to configure an inbound trunk and the required credentials.
• Example call flow showing how your SIP provider should authenticate and how dispatch rules map calls into rooms.
• Specific configuration examples for common SIP providers or PBXs if you tell me which one you’re using.
Which of those would you like next?rapid-honey-43838
02/26/2026, 11:18 PMtall-airline-16756
02/26/2026, 11:18 PMcreate_sip_participant with room_name, sip_trunk_id (your outbound trunk ID), sip_call_to (destination number), and participant_identity.
◦ Optionally set sip_number or caller ID fields so the recipient sees the correct origin.
1. Confirm caller ID / passthrough rules with your provider:
◦ Some providers require verified numbers or restrict arbitrary caller ID. Configure sip_number accordingly.
1. Ensure network requirements:
◦ Your provider must accept INVITEs from LiveKit (or whitelist LiveKit IPs).
◦ RTP ports must be open so media flows into the LiveKit room.
I can provide a concrete example or exact configuration steps — which would be most helpful:
• The name of your dialer or SIP provider (e.g., Twilio, Plivo, 3CX, a PBX vendor)?
• Whether your provider requires SIP authentication (username/password) or IP whitelisting?
• Do you need LiveKit to receive DTMF or media back from the callee into a LiveKit room?
Tell me those details and I’ll give a tailored trunk example and the exact API request you should use.rapid-honey-43838
02/26/2026, 11:19 PMtall-airline-16756
02/26/2026, 11:19 PMsip_trunk_id and sip_call_to). LiveKit will initiate an outbound INVITE through the configured trunk to your termination URI.
• Ensure media and signaling reachability:
◦ Your dialer must accept INVITEs from LiveKit (or whitelist LiveKit IPs).
◦ RTP ports used by LiveKit must be permitted so audio flows back into the LiveKit room.
• Caller ID and SIP header considerations:
◦ Set the caller ID (sip_number or equivalent) when creating the SIP participant if you need a specific ANI presented to the remote side.
◦ Verify with your provider whether they require verified numbers or specific header formats.
If you want a concrete configuration example or API request, tell me:
• The name of your dialer/SIP provider (or vendor).
• Whether the provider requires SIP auth (username/password) or IP whitelisting.
• The termination URI format your provider expects (if known), and whether you need specific SIP headers or caller ID preservation.
With those details I’ll provide an exact trunk JSON example and the API call payload you should use to terminate calls to your dialer.rapid-honey-43838
02/26/2026, 11:19 PMtall-airline-16756
02/26/2026, 11:20 PMallowed_addresses (IP whitelist).
◦ Note the LiveKit SIP domain for your project/region (the project/region level domain is used for trunk connections).
1. Point your dialer to LiveKit
◦ In your dialer/PBX, set the SIP peer/peer trunk to the LiveKit SIP domain and port.
◦ Provide the trunk credentials (username/password) or ensure the dialer’s outbound IP is in the trunk’s allowed list.
◦ Ensure SIP signaling (port 5060/5061 as used) and RTP ports are reachable to/from LiveKit.
1. Configure dispatch rules to map inbound calls into LiveKit rooms
◦ Define a dispatch rule on the inbound trunk that determines which room an incoming call should join (for example based on dialed number, SIP header, or static mapping).
◦ LiveKit will use that rule to create or route the call into the correct room when the dialer sends an INVITE.
1. Caller ID, From/To handling, and media
◦ Decide what caller ID (ANI) you want shown in LiveKit and map it in the dispatch rule or trunk settings.
◦ Ensure RTP (media) flows: open the necessary RTP port range between your dialer and LiveKit so audio arrives in the LiveKit room.
◦ If you need DTMF or special SIP headers preserved, confirm your dialer will forward those in the INVITE and configure LiveKit dispatch rules to inspect them.
Checklist of typical fields to configure
• On LiveKit inbound trunk:
◦ name, inbound host/port, auth_username, auth_password (or allowed_addresses)
◦ Dispatch rule(s) mapping incoming numbers / headers → room_name
• On your dialer/PBX:
◦ SIP peer/trunk host = LiveKit project/region SIP domain
◦ Authentication credentials (if using username/password) or ensure your dialer IP is whitelisted
◦ Outbound proxy and transport (UDP/TCP/TLS) matching what LiveKit expects
• Networking:
◦ SIP signaling port(s) open
◦ RTP port range open for media
◦ Any NAT/SIP ALG settings adjusted to avoid breaking SDP
What I can provide next
• A concrete inbound trunk JSON example and CLI/API command to create it.
• Sample dispatch rules showing common mappings (phone-number → room, header → room).
• Example dialer/PBX settings for common vendors (if you tell me which dialer or PBX you’re using).
• Troubleshooting steps for common problems (authentication failures, no audio, SIP 4xx/5xx responses).
To give exact configuration snippets, please tell me:
• The dialer or PBX vendor/name you’re using (or if it’s custom).
• Whether your dialer supports SIP auth with username/password or only IP whitelisting.
• How you want incoming calls routed to rooms (e.g., by DID/dialed number, by a SIP header, or always to a single room).
Once you share those, I’ll give the exact trunk config, a dispatch rule example, and the dialer-side settings you should use.rapid-honey-43838
02/26/2026, 11:21 PMtall-airline-16756
02/26/2026, 11:21 PMallowed_addresses with Vicidial’s outbound IP(s).
• Project/region SIP domain:
◦ Use your project/region-level SIP domain (the trunk connection uses that domain). You will give this domain to Vicidial as the peer/host.
• Dispatch rule(s):
◦ Define how incoming INVITEs map to rooms (by called number/DID, by a SIP header, or static mapping).
• Media settings:
◦ Ensure NAT/SRTP/codec preferences are compatible with Vicidial and RTP ports are open.
If you want, I can produce the exact JSON/CLI trunk creation example once you give region and auth choice.
3) Vicidial (Asterisk-based) - trunk/peer configuration (example options)
• If using SIP auth (username/password / registrar-style):
◦ On Vicidial (in the SIP/IAX peer entry), set the peer host to your LiveKit SIP domain, port (usually 5060), and set outbound auth credentials to the `auth_username`/`auth_password` you created on the LiveKit inbound trunk.
◦ Use transport UDP/TCP/TLS depending on what LiveKit supports and your network.
• If using IP-based allowlisting:
◦ Configure Vicidial to send to the LiveKit SIP domain with no registration/auth; ensure LiveKit inbound trunk allowed_addresses contains Vicidial’s IP(s).
• Typical Vicidial/Asterisk peer snippet (conceptual):
◦ host=<livekit-project.region.sip.livekit.cloud>
◦ type=peer
◦ username=<auth_username> (if registering)
◦ secret=<auth_password> (if registering)
◦ port=5060
◦ context=from-trunk
◦ transport=udp
◦ disallow=all
◦ allow=ulaw,alaw
◦ nat=force_rport,comedia (if NAT is present)
◦ qualify=yes
4) Dispatch rules → mapping the incoming call to a room
• Common patterns:
◦ DID-based: map the called number (To) to a specific room (good when each campaign/DID maps to a room).
◦ Header-based: inspect a custom SIP header (e.g., X-Room-Name) that Vicidial sets and map that to the room.
◦ Static: all inbound calls go to one room.
• Decide which you want and I’ll provide an exact dispatch rule example.
5) Caller ID, From/To, and DTMF handling
• Caller ID: decide whether to preserve Vicidial’s caller ID in LiveKit. You may map the From header into room metadata for display.
• DTMF: ensure Vicidial passes DTMF in a mode LiveKit accepts (RFC2833/RFC4733 is typical). Confirm codecs and DTMF transport to avoid lost tones.
6) Networking and media
• Ensure Vicidial can reach LiveKit signaling ports (SIP/5060 or chosen transport) and RTP port ranges for audio.
• If Vicidial is behind NAT, configure NAT settings (force_rport, comedia) and open RTP ports.
• If you use TLS or SRTP, ensure certificates and transport are configured on both sides.
7) Testing and verification checklist
• From Vicidial, send an INVITE to the LiveKit SIP domain and verify:
◦ SIP 200/2xx response or appropriate challenge for auth.
◦ Authentication works (if configured).
◦ LiveKit dispatch maps call into the intended room.
◦ Audio flows both ways in the LiveKit room.
◦ DTMF works if needed.
• If audio fails, check RTP paths, codecs, and NAT settings.
8) What I need from you to produce exact configs
• LiveKit project region (so I can show the exact SIP domain).
• Do you prefer username/password auth or IP allowlist for trunks?
• How do you want inbound calls routed to rooms? (by DID / by header / single room)
• Do you need DTMF, and which codecs does your Vicidial instance use?
• Vicidial transport preference (UDP/TCP/TLS) and Vicidial outbound IP(s) if using allowlist.
Tell me those details and I’ll return:
• A ready-to-use LiveKit inbound trunk JSON/CLI example.
• The exact Vicidial peer/trunk settings to paste into your config.
• A dispatch rule example that maps calls to rooms the way you want.rapid-honey-43838
02/26/2026, 11:23 PMtall-airline-16756
02/26/2026, 11:23 PMallowed_addresses includes Vicidial’s outbound IP(s).
Next steps I can provide
• Exact LiveKit inbound trunk JSON/CLI example for Vicidial (tell me your LiveKit project region).
• Exact Vicidial peer/trunk config you can paste into sip.conf or the Vicidial GUI.
• A dispatch rule example (DID→room or header→room) so incoming calls map to the correct LiveKit room.
Which would you like me to produce first, and what is your LiveKit project region and Vicidial auth preference (username/password or IP allowlist)?