can you explain how the sip call can be disconnect...
# ask-ai
r
can you explain how the sip call can be disconnected from the agent_session?
t
Thanks for reaching out, John. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! If you want to disconnect a SIP call from the
agent_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