enough-arm-57696
07/10/2025, 10:30 PMtall-airline-16756
07/10/2025, 10:30 PMtall-airline-16756
07/10/2025, 10:30 PMdelete_room
API is the recommended way to end a call in LiveKit. When you delete a room, all participants are automatically disconnected and receive a Disconnected
event. This should result in the call hanging up for everyone involved.
If you are finding that the call does not hang up after the room is deleted, please ensure that:
• You are using the delete_room
API and not just disconnecting the agent participant
• The correct room name/ID is passed to the API
• Clients are listening for and handling the Disconnected
event properly
If these conditions are met and the issue persists, please provide more detail about your client handling or any specific errors you are seeing. I can then assist further based on your implementation details.
Sources: Agents telephony integration | LiveKit Docs | Managing rooms | LiveKit Docs | Inside a session | LiveKit Docs | Anatomy of an Agent | LiveKit Docsenough-arm-57696
07/10/2025, 10:32 PMtall-airline-16756
07/10/2025, 10:33 PMdelete_room
API is actually super straightforward and exactly what you want to do. It's like hitting the "end call" button that works perfectly for everyone involved.
Let me break down why this is such a smooth solution:
• If you just disconnect the agent, the SIP participant might end up hearing awkward silence—not cool, right? So delete_room
is definitely the way to go.
• Pro tip: If you want to play a final message from the agent, just wait for that to finish up before you delete the room. It keeps things polished.
• Bonus: If you're recording with LiveKit Egress, deleting the room stops the recording cleanly too!
The best part? No extra complicated steps for SIP calls. The delete_room
API has got your back and handles all the technical cleanup automatically. Easy peasy!
Sources: Agents telephony integration | LiveKit Docs | Managing rooms | LiveKit Docs | Inside a session | LiveKit Docs | telephony/sip_lifecycle.py | pkg/sip/outbound.go | agent.pyenough-arm-57696
07/10/2025, 10:35 PMtall-airline-16756
07/10/2025, 10:35 PMenough-arm-57696
07/28/2025, 9:58 PM