important-judge-78504
11/25/2025, 8:55 PMtall-airline-16756
11/25/2025, 8:55 PMtall-airline-16756
11/25/2025, 8:56 PMDUPLICATE_IDENTITY, ROOM_DELETED, PARTICIPANT_REMOVED, etc.). If you’re seeing CLIENT_INITIATED in logs and want help confirming the exact client action that caused it, tell me which SDK (web, iOS, Android, or server) and any relevant log snippets or timestamps and I’ll help trace it.
Sources: Connecting to LiveKit | LiveKit docsimportant-judge-78504
11/25/2025, 9:05 PMtall-airline-16756
11/25/2025, 9:05 PMtall-airline-16756
11/25/2025, 9:07 PMCLIENT_INITIATED means the participant’s client explicitly requested to leave (e.g., your Python client called disconnect, user hit hang‑up, or the SIP endpoint sent BYE). Twilio reporting the callee “hung up” is the same event from Twilio’s side — a SIP BYE from the callee results in LiveKit interpreting the close reason as CLIENT_INITIATED.
What I can help confirm next:
• Check your Python app logs around the timestamp for any Room.disconnect() (or equivalent) calls.
• Check LiveKit webhook ParticipantLeft events at that time.
• Check Twilio call SID events / debug logs for the SIP BYE that matches the timestamp.
Tell me which of those logs you want me to help correlate (paste relevant snippets/timestamps or the Twilio call SID) and I’ll walk through the exact event correlation. Would you like me to start with the Python client logs or the Twilio call events?
Sources: Server Core & Participant Management | livekit/livekit_composite | DeepWiki | Connecting to LiveKit | LiveKit docs | Inbound calls with Twilio Voice | LiveKit docs | Webhooks | LiveKit docsimportant-judge-78504
11/25/2025, 9:09 PMtall-airline-16756
11/25/2025, 9:09 PMCLIENT_INITIATED means the LiveKit participant (the client connected to LiveKit) sent a leave. Twilio labels the SIP/PSTN side that sent the BYE as the “callee” in its call leg view — roles can differ between your app (caller/callee) and the SIP leg topology.
• Proxying or bridging behavior: If Twilio was bridging the inbound PSTN call to your agent, Twilio may show the agent leg ending (callee hangup) even if the LiveKit participant that initiated the LiveKit disconnect was the caller. A BYE on the Twilio agent leg will appear as a callee hangup.
• App flow: Your application or agent UI might have executed a disconnect (calling Room.disconnect()) in response to a Twilio event (or vice versa), so both systems log their own viewpoint: LiveKit logs the client-initiated leave while Twilio logs the agent leg hangup.
• Timing and race conditions: The disconnect could be initiated by one side but reflected in logs on the other side slightly later; different systems may attribute the action to the party on their call leg.
Quick checks to confirm the root cause
1. Get the Twilio Call SID and examine Twilio webhook/events around the timestamp for a SIP BYE and which call leg (from/to) sent it.
2. Check your Python client logs around Nov 25 2025 31411 PM ET for any explicit Room.disconnect() or handler that triggers disconnect on agent hangup.
3. Inspect LiveKit webhooks (ParticipantLeft) and any server-side logic that reacts to Twilio webhooks — look for code that issues a LiveKit disconnect when Twilio reports a hangup.
4. Compare timestamps (UTC) of:
◦ Twilio BYE event
◦ LiveKit ParticipantLeft webhook
◦ Your Python client disconnect call/log entry
If you want, paste the Twilio Call SID and the exact log lines (or timestamps) for the Twilio BYE, the LiveKit ParticipantLeft, and your Python client disconnect; I’ll correlate them and point to which side initiated the termination from each system’s perspective. Which log set would you like me to check first?