I'm having self hosted livekit environment with li...
# ask-ai
a
I'm having self hosted livekit environment with livekit sip server. I've updated prometheous port and webhook url set. How do I receive telecom/gateway status code like 486, 429 to understand the gateway side disposition of the call to understand the disposition like "no answer", "rejected", "ringing", "answered", "busy" etc.
t
Thanks for reaching out, Hiren. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding about how to receive SIP gateway/status response codes (486, 429, etc.) so you can map dispositions like "no answer", "rejected", "ringing", "answered", "busy". I don’t have enough detail to give exact steps. A few quick questions to narrow this down: • Are you using LiveKit’s SIP server built-in SIP gateway (sipgateway) or a separate external SBC/IMS that connects to LiveKit? • Do you currently receive any webhook events from LiveKit for SIP calls? If so, can you paste a redacted example of the webhook payload you see when a call ends? • Do you have webhooks configured for call lifecycle events (offer/answer, progress, hangup) and are those reaching your webhook URL? • Are you running any custom SIP headers or translations that might strip SIP response codes? Once you share which gateway mode you use and an example webhook payload (redact any sensitive fields), I’ll tell you exactly where to look for SIP response codes or how to enable them and map them to dispositions. , with interactive elements
a
your first bullet point answer, Yes.. telecom gateway is separate which is sending inbound call to livekit sip server, and for outbound call livekit sip server sends an invite to that telecom gateway only. 2nd answer.. yes webhook is updated in livekit and I'm currently getting all the events of participants there.. with call lifecycle events also.. I'm looking for sip related response code from telecom OR gateway in that webhook logs that are coming right now for lifecycle events
t
Thanks — I'm responding about getting SIP response codes (486, 429, etc.) from your telecom gateway in the webhook events. Short answer: LiveKit webhook lifecycle events do not include raw SIP response status codes from an upstream/downstream telecom gateway. Webhooks provide participant and room state changes (join/leave, room_started/room_finished) and higher-level disconnect reasons rather than the SIP numeric responses. What you can do now: • Use the participant disconnect reason in your webhook (e.g.,
participant_left
or session end fields) to infer disposition (answered, client hangup, timed out). I can help map common disconnect reasons to dispositions. • Enable and collect SIP logs on your self-hosted SIP server instance (or on the telecom gateway) to capture the actual SIP responses (486, 429, 480, 200). Those logs contain the definitive SIP status codes. • If you want programmatic SIP codes in your system, forward the SIP logs or modify the SIP bridge component to emit a custom webhook that includes the gateway's SIP response code (I can outline the steps if you want). Next step: Do you want help mapping LiveKit disconnect reasons to dispositions, or do you want instructions to capture/forward SIP response codes from your SIP server? Which option should I walk through? Sources: Agents telephony integration | LiveKit Documentation | Best practices for managing webhook event streams | LiveKit | server-sdk-js | livekit/livekit_composite | DeepWiki | Build a healthcare intake assistant with an Anam avatar | LiveKit | Agent session | LiveKit Documentation, with interactive elements
a
provide me instructions to capture/forward SIP response codes from your SIP server?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!