ripe-elephant-41652
08/14/2025, 5:49 AMtall-airline-16756
08/14/2025, 5:49 AMtall-airline-16756
08/14/2025, 5:49 AMagent_session
, here are some friendly options for you:
• Disconnecting the Agent Only: You can use ctx.shutdown(reason)
to gently disconnect the agent while keeping the SIP call going. This means the agent steps out of the room, but the call itself stays alive.
• Ending the Call for Everyone: If you want to wrap things up for all participants, the delete_room
API is your go-to. It ends the session and removes the room from the server, so the SIP call and everyone in it will be finished.
• Custom Call Handling: Looking for more control? You can dive into SIP participant APIs or manage the call through your SIP trunk setup. For instance, you might create a function that hangs up by deleting the room.
If you want me to walk you through any of these or have questions, just let me know—I’m here to help!
Sources: Agents telephony integration | LiveKit Docs | Agents telephony integration | LiveKit Docs | Inside a session | LiveKit Docs