adorable-queen-16922
10/12/2025, 12:26 PMtall-airline-16756
10/12/2025, 12:26 PMtall-airline-16756
10/12/2025, 12:27 PMParticipantInfo object has a disconnect_reason field that can give you extra insight—for example, JOIN_FAILURE appears when the client couldn’t complete the connection. I hope this helps clear things up! If you have any more questions, feel free to ask.
Sources: pkg/rtc/room.go | livekit-ffi/protocol/participant.protoadorable-queen-16922
10/12/2025, 12:28 PMdisconnect_reason?tall-airline-16756
10/12/2025, 12:29 PMdisconnect_reason values in LiveKit to help you better understand what might be happening when a disconnection occurs:
• UNKNOWN_REASON (0): Sometimes, the reason for disconnection isn’t clear, and it falls under this category.
• CLIENT_INITIATED (1): This means the client decided to disconnect.
• DUPLICATE_IDENTITY (2): Another participant with the same identity joined the room, causing this disconnect.
• SERVER_SHUTDOWN (3): The server instance is shutting down, which leads to disconnection.
• PARTICIPANT_REMOVED (4): This happens when RoomService.RemoveParticipant is called.
• ROOM_DELETED (5): When RoomService.DeleteRoom is called, the room is deleted, causing disconnection.
• STATE_MISMATCH (6): The client tried to resume a session, but the server didn’t recognize it.
• JOIN_FAILURE (7): The client couldn’t fully connect to the room.
• MIGRATION (8): For cloud-only setups, the server asked the participant to move the connection elsewhere.
• SIGNAL_CLOSE (9): The signal websocket closed unexpectedly.
• ROOM_CLOSED (10): The room closed because all Standard and Ingress participants left.
• USER_UNAVAILABLE (11): The SIP callee didn’t respond in time.
• USER_REJECTED (12): The SIP callee rejected the call (busy).
• SIP_TRUNK_FAILURE (13): There was a SIP protocol failure or an unexpected response.
• CONNECTION_TIMEOUT (14): The server timed out the participant’s session.
• MEDIA_FAILURE (15): There was a media stream failure or timeout.
These disconnect reasons are standardized across all LiveKit SDKs and protocols, so you can rely on them to diagnose issues consistently. If you have any questions about these or need further assistance, please feel free to reach out—I’m here to help!
Sources: livekit-protocol/src/livekit.rs | packages/livekit-rtc/src/proto/participant_pb.ts | livekit/livekit_models.pb.goadorable-queen-16922
10/12/2025, 3:42 PMtall-airline-16756
10/12/2025, 3:42 PMMaxRetries parameter to fit your needs. Plus, each webhook event comes with unique identifiers to help your system recognize and avoid processing duplicates. I hope this helps clarify things—please feel free to ask if you want to dive deeper or need any assistance!
Sources: webhook/webhook_test.go | Webhooks | LiveKit Docs | Webhook & Event Notification System | livekit/livekit_composite | DeepWikiadorable-queen-16922
10/13/2025, 11:20 PMtall-airline-16756
10/13/2025, 11:21 PMDUPLICATE_IDENTITY disconnect on the client side using RoomEvent in TypeScript. You can do this by listening to the RoomEvent.Disconnected event, which conveniently provides a DisconnectReason as an argument. Here's a friendly example to guide you through it:
import { Room, RoomEvent, DisconnectReason } from 'livekit-client';
const room = new Room();
room.on(RoomEvent.Disconnected, (reason?: DisconnectReason) => {
if (reason === DisconnectReason.DUPLICATE_IDENTITY) {
console.log('Disconnected due to duplicate identity: another client with the same identity joined the room.');
// This is a great place to handle the duplicate identity scenario,
// like showing an alert or preventing reconnection, to keep things smooth for your users.
} else {
console.log('Disconnected for another reason:', reason);
}
});
Just make sure to register this listener either right after connecting to the room or during your room initialization. When the reason is DUPLICATE_IDENTITY, it means another participant with the same identity has joined, and you can handle it accordingly. If you need any more help with this, feel free to ask—I'm here to support you!
Sources: src/room/events.ts | Connecting to LiveKit | LiveKit Docs | agent-console/lib/event-definitions.tsx | livekit-android-sdk/src/main/java/io/livekit/android/events/RoomEvent.kt | Runtime/Scripts/Room/Room.cs