mysterious-teacher-37099
08/20/2025, 5:56 PMtall-airline-16756
08/20/2025, 5:56 PMtall-airline-16756
08/20/2025, 5:57 PMclose
event on the agent session lets you know when a disconnection happens. The CloseEvent
can tell you why, with reasons like ERROR
(which might mean a crash), PARTICIPANT_DISCONNECTED
, or USER_INITIATED
.
• Participant Disconnection Events: You can keep an eye on participantDisconnected
events to spot when anyone, including agents, leaves the room. The DisconnectReason
gives you more clues, like UNKNOWN_REASON
or SIGNAL_CLOSE
.
Putting these together, you’ll have a solid way to track and handle agent disconnections. If you want, I’m here to help you set it up!
Sources: examples/voice_agents/session_close_callback.py | agent-console/lib/event-definitions.tsx