How do I determine why a call fails to connect (re...
# ask-ai
h
How do I determine why a call fails to connect (rejected by user, not picked up or internal server error)?
t
Thanks for reaching out, tri.nguyen. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to determine why a SIP call failed to connect (user rejected, no answer, or server error). Here's how to diagnose each case and where to look. 1. Check the SIP participant status • Monitor the participant's `sip.callStatus`: ◦ Transitions to
hangup
after
ringing
often indicate rejection or timeout. ◦ Remaining
ringing
until a timeout then
hangup
indicates no answer (no-answer path). 1. Detect "rejected by user" • Look for a quick
ringing
→
hangup
transition and check client-side events for a user-decline action. • SIP response codes from the callee (e.g., 486 Busy Here, 603 Decline) are indicative—correlate with your client logs since LiveKit does not expose full SIP reason headers directly. 1. Detect "not picked up / no answer" • If
sip.callStatus
stays
ringing
until
ringing_timeout
and then becomes
hangup
, the call timed out without answer. • Adjust or inspect the
ringing_timeout
set in
CreateSIPParticipant
(max 80s) to control how long LiveKit waits. 1. Detect internal server / trunk errors • API call failures (from
CreateSIPParticipant
) return HTTP/Twirp errors you must catch and log: ◦ 403 Forbidden — authentication/permission issue with the trunk ◦ 404 Not Found — invalid trunk ID or unreachable destination ◦ 503 Service Unavailable — SIP provider endpoint unreachable (likely misconfiguration) • Correlate these API errors with LiveKit server logs. 1. Correlate LiveKit logs + SIP provider logs • Use LiveKit call logs in the dashboard together with your SIP provider's signaling logs to trace exact SIP responses and timing for the call attempt. • Enable or include SIP headers and custom attributes for trace IDs so you can match events across systems. If you’d like, tell me: • an example call ID or timestamp, • the
ringing_timeout
you’re using, • and any API error codes you’ve seen— and I’ll help you interpret the logs and pinpoint the likely cause. Sources: SIP participant | LiveKit docs | SIP APIs | LiveKit docs | SIP troubleshooting guide | LiveKit docs | Create and configure a Plivo SIP trunk | LiveKit docs