faint-arm-51818
10/07/2025, 10:46 AMtall-airline-16756
10/07/2025, 10:46 AMtall-airline-16756
10/07/2025, 10:46 AMsip.callStatus attribute of the SIP participant. This attribute clearly shows the current call state and will update to hangup when the user ends the call.
Here’s a simple approach you can try:
• Set up a listener for changes in the sip.callStatus attribute of the SIP participant. For instance, you can use an event listener to catch when the status switches to hangup.
• Another option is to listen for the participant_disconnected room event, which triggers whenever any participant leaves the room. Just keep in mind that this event doesn’t specifically tell you if it was a hangup or another reason for disconnection.
If you’d like, I’m here to help with more details or walk you through the implementation—just let me know!
Sources: protobufs/livekit_sip.proto | telephony/sip_lifecycle.py | agent.py | Getting Help & Troubleshooting | livekit/livekit_composite | DeepWiki | Agent Testing & CI/CD | livekit/livekit_composite | DeepWikifaint-arm-51818
10/07/2025, 10:48 AMtall-airline-16756
10/07/2025, 10:48 AMparticipant_disconnected event to a SummaryAgent that summarizes and logs the call history, here’s a simple step-by-step guide:
1. Listen for the participant_disconnected event: Set up a handler in your room logic to catch this event whenever a participant leaves the room.
2. Filter for relevant participants: Make sure to check the participant type (like user vs agent) so that the summarization only triggers for the right people.
3. Access session history: You can grab the full conversation history by using the session’s history object, accessed via session.history.
4. Generate a summary: Use session.generate_reply() with clear instructions such as "Summarize the full conversation."
5. Log or store the summary: Go through session.history.items to log each message or save the summary for later use.
If you’d like, I’m here to provide detailed code examples or help you with any part of the implementation—just let me know!
Sources: Handling events | LiveKit Docs | terminal-client/client.py | livekit-rtc/livekit/rtc/room.py | agent-console/lib/event-types.ts | examples/avatar_agents/audio_wave/avatar_runner.pyfaint-arm-51818
10/07/2025, 10:49 AMtall-airline-16756
10/07/2025, 10:49 AM