Does livekit support this: LiveKit SIP trunks s...
# ask-ai
s
Does livekit support this: LiveKit SIP trunks support a X-LK-Room-Name header to specify the room name:
t
Thanks for reaching out, Andy. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether LiveKit SIP trunks support an X-LK-Room-Name header to specify the room name. We do not support an
X-LK-Room-Name
SIP header for selecting the room. You can accomplish room routing using SIP trunk dispatch rules and other routing mechanisms instead. If you'd like, tell me how you expect calls to be routed (example: by caller ID, dialed number, SIP request URI, or a custom header you control) and I can suggest the specific dispatch rule setup that will map incoming calls to the correct room. Sources: Authentication | LiveKit docs
s
Can I use a custom SIP header value (like X-Event-Log-Id) in the dispatch rule room name template? Or is there another way to get a predictable room name that I control?
t
You're asking whether a custom SIP header (like
X-Event-Log-Id
) can be used directly in a dispatch rule room-name template, or how to get a predictable room name you control. You cannot use a SIP header directly in the static room name template. Instead, map the header to a participant attribute and use that attribute in your agent/dispatch logic to determine or create the room name. Steps: 1. On the inbound trunk, add a
headers_to_attributes
mapping (e.g., map
X-Event-Log-Id
→
event_log_id
). 2. In your agent code, read the participant attribute (
event_log_id
) for SIP participants and: ◦ create/join a room named from that value (for predictable names), or ◦ route the call based on that attribute. Alternative if you control dialed numbers: use
roomPrefix
in
dispatchRuleCallee
to derive room names from the called number. If you want, tell me which method you prefer (header-based attribute mapping or callee-prefix) and share an example header value or dialed number; I’ll give the exact trunk config and sample agent code. Sources: SIP dispatch rule | LiveKit docs | SIP participant | LiveKit docs