tall-tailor-23658
09/28/2025, 8:36 AMtall-airline-16756
09/28/2025, 8:36 AMtall-airline-16756
09/28/2025, 8:37 AMctx.add_shutdown_hook() to register a shutdown hook, which is perfect for cleanup tasks. Another great option is to listen for the disconnected event on context.room and take care of cleanup right within that event listener.
• For Client-Side Applications: Simply attach a listener to the disconnected event of the Room object. For instance, in JavaScript, you might use room.once('disconnected', (room, error) => { ... }) to handle it smoothly.
If you'd like, I can share some specific examples or help you further with this—just let me know!
Sources: sip-refer/agent.py | quickstart/src/joinroom.js | callkit/callkit-example/CallManager.swift | Docs::Agents