If a call comes in via SIP, if the call isn't answ...
# ask-ai
p
If a call comes in via SIP, if the call isn't answered and call hangs up why does it take 46 seconds after the paritcipant (caller) hanging up (leaving) for room to be finished?
t
Thanks for reaching out, Sunny. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you please share a bit more about your SIP call setup and room configuration? For instance, do you have any specific timeout settings or custom logic that might influence what happens in the room after a participant leaves? I’m here to help you figure this out!
p
haven't set up anything custom. where can I find this?
t
The delay you’re noticing is most likely due to LiveKit’s default departure timeout and cleanup process. When a SIP participant hangs up, the room doesn’t close right away. Instead, LiveKit keeps the room active for a little while to allow for reconnections or to avoid ending things too quickly. This includes a default departure timeout of 20 seconds, plus an additional cleanup process that can take 30–45 seconds. If you want to reduce this delay, a good approach is to explicitly delete the room when the SIP participant hangs up. You can keep an eye on the
sip.callStatus
attribute for the value
"hangup"
and then use the
DeleteRoom
API to close the room immediately. I’m here to help if you’d like some guidance on how to set this up!