alert-continent-21953
10/17/2025, 4:38 PMtall-airline-16756
10/17/2025, 4:38 PMtall-airline-16756
10/17/2025, 4:39 PMalert-continent-21953
10/17/2025, 4:39 PMtall-airline-16756
10/17/2025, 4:40 PMdelete_room API to end the call for everyone at once. This way, all participants get disconnected simultaneously, which is super convenient.
• Room Disconnect Method: For regular LiveKit rooms, the disconnect() method works great to disconnect individual participants smoothly.
• Agent Function Tools: If you're working with agent setups, creating function tools to handle call termination can be really helpful, especially to make sure the agent finishes speaking before the call ends.
• Frontend UI Controls: Adding UI buttons that trigger the hangup functionality is a user-friendly way to manage calls in your web applications.
Choosing the best method really depends on what fits your use case best. For telephony, I usually recommend the Room Deletion Method. If you'd like, I’m here to provide more details or examples on any of these options—just let me know!
Sources: Agents telephony integration | LiveKit Docs | agent.py | LivekitUnitySampleApp/Assets/LivekitSamples.cs | complex-agents/drive-thru/frontend/components/livekit/agent-control-bar/age...alert-continent-21953
10/17/2025, 4:49 PMtall-airline-16756
10/17/2025, 4:49 PMasync def hangup(self):
"""Helper function to hang up the call by deleting the room"""
job_ctx = get_job_context()
await job_ctx.api.room.delete_room(
api.DeleteRoomRequest(
room=job_ctx.room.name,
)
)
This snippet makes sure the room is deleted and everyone is disconnected smoothly. If you'd like, I'm here to help you understand it better or assist you with adding it to your application. Just let me know!alert-continent-21953
10/17/2025, 5:00 PMtall-airline-16756
10/17/2025, 5:00 PMalert-continent-21953
10/20/2025, 1:45 PM