In what scenario does the agent not drop from the ...
# ask-ai
c
In what scenario does the agent not drop from the call when the user has already cut the call? Does it need to be done manually?
t
Thanks for reaching out, Subham. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I wanted to share some helpful information about how the
close_on_disconnect
option works in
RoomInputOptions
. When this option is set to
false
, the agent won’t automatically drop from the call after the user disconnects. Usually, this option is enabled by default, so the agent session closes automatically when the user disconnects for reasons like
CLIENT_INITIATED
,
ROOM_DELETED
, or
USER_REJECTED
. If you decide to disable
close_on_disconnect
, the agent will stay in the call, and you won’t need to manually intervene right away. However, you will want to add your own logic to close the session at the right time—using methods like
session.aclose()
or `session.shutdown()`—to keep everything running smoothly. Please feel free to reach out if you’d like me to walk you through session management or egress control in more detail. I’m here to help! Sources: examples/voice_agents/session_close_callback.py | How to capture real-time agent transcriptions during conversations | Events and error handling | LiveKit Docs | Connecting to LiveKit | LiveKit Docs | Docs::Agents
c
If I have not configured for room ending options, what are the scenarios when the room ends?
t
I’d love to help you understand how room endings work in LiveKit! If you haven’t set up any specific room ending options, here’s what happens automatically: • The room will close after the departure timeout once everyone has left. Usually, this timeout is set to 20 seconds by default. • If a room is created but no one joins within the empty timeout, it will close on its own. This timeout is typically 300 seconds (5 minutes). • For rooms with LiveKit Agents, the room closes automatically when the last non-agent participant leaves, and any remaining agents will be disconnected. • Recordings from room composite egress will stop automatically when the room ends since they’re linked to the room’s lifecycle. These are the default behaviors, so you don’t have to worry about setting them up unless you want to customize. If you’d like, I’m here to help you adjust these timeouts or explain anything else in more detail—just let me know! Sources: Avoiding Room ID Reuse When Re-Creating Rooms With the Same Name | pkg/rtc/room.go | Recording and export | LiveKit Docs | livekit/livekit_room.pb.go | Connecting to LiveKit | LiveKit Docs
c
What is the maximum duration for egress?
t
Thanks for reaching out! I’m happy to help explain the maximum duration for egress in LiveKit based on the output type: • For file output (like MP4, OGG, WebM), the time limit is 3 hours. • For other output types (such as HLS segments, HLS/RTMP streaming, or raw single stream), the time limit is 12 hours. Once these limits are reached, any ongoing egress will automatically end with the status
LIMIT_REACHED
. If you’d like, I’m here to walk you through any part of this or help with your egress settings—just let me know! Sources: Quotas and limits | LiveKit Docs