Skip to content

SIP Channels not ended when associated room is ended #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
adrianhand opened this issue Mar 20, 2025 · 2 comments
Open

SIP Channels not ended when associated room is ended #316

adrianhand opened this issue Mar 20, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@adrianhand
Copy link

This feels like incorrect behaviour to me but would appreciate at least someone confirming whether livekit is behaving in the way I expect.

I have got a PBX connected to Livekit cloud SIP trunks.

I've got a dispatch rule which creates a room, then a webhook on room creation allows me to bring other participants into the room (webrtc clients).

When I end the room - manually, for example - all participants are ejected from the room but the originator - connected via SIP channels - keeps the SIP channel open after the room is gone.

I appreciate that I can terminate that channel myself by hoovering up the room deletion webhook, but since I can't think why you would want the channel to remain open, it doesn't make sense to me that its not terminated when the room it is a part of is disposed of.

Would appreciate any pointers or thoughts, thank you!

@dennwc
Copy link
Contributor

dennwc commented Mar 20, 2025

LiveKit SIP automatically terminates SIP connections when an associated room is deleted. If you observe that SIP connection is still active, it might be caused by some misconfiguration of SIP signalling. Specifically - BYE message might not be delivered correctly. Could you share the affected call ID(s) so that we can debug it on our end? Thank you!

@adrianhand
Copy link
Author

Thank you! When the room is closed we get a participant left webhook message, carrying:

  "sip.callID": "SCL_iKV7aTjyfxnq",
  "sip.callIDFull": "9281003c-5b81-4159-8f69-918827dcfd7a",

Below is the full payload fwiw. I am expecting to receive a SIP BYE but can confirm that we don't receive anything on the far (PBX) end. Thank you for offering to look it up for us, thats really mega 🙏

{ "event": "participant_left", "room": { "sid": "RM_dPN4a8gg3YPr", "name": "call-_01246381218_KeDvG5rHEp2X", "emptyTimeout": 300, "creationTime": "1742481643", "enabledCodecs": [ { "mime": "video/H264" }, { "mime": "video/VP8" }, { "mime": "video/VP9" }, { "mime": "video/AV1" }, { "mime": "audio/red" }, { "mime": "audio/opus" } ], "version": { "unixMicro": "1742481643309348" }, "departureTimeout": 20, "creationTimeMs": "1742481643299" }, "participant": { "sid": "PA_rHjDNzdrRFoy", "identity": "sip_01246381218", "state": "DISCONNECTED", "joinedAt": "1742481643", "name": "Phone 01246381218", "version": 7, "permission": { "canSubscribe": true, "canPublish": true, "canPublishData": true, "canUpdateMetadata": true }, "region": "olondon1b", "isPublisher": true, "kind": "SIP", "attributes": { "sip.callID": "SCL_iKV7aTjyfxnq", "sip.callIDFull": "9281003c-5b81-4159-8f69-918827dcfd7a", "sip.callStatus": "active", "sip.callTag": "5b8fd290-98a8-48b4-bdf5-599a11d6c190", "sip.hostname": "139.162.237.46", "sip.phoneNumber": "01246381218", "sip.ruleID": "SDR_etkyKTTvgaUe", "sip.trunkID": "ST_rFs5SbVJPQWo", "sip.trunkPhoneNumber": "077" }, "disconnectReason": "PARTICIPANT_REMOVED", "joinedAtMs": "1742481643309" }, "id": "EV_z2hnyHtjdpUV", "createdAt": "1742481671" }

@dennwc dennwc self-assigned this Mar 20, 2025
@dennwc dennwc added the bug Something isn't working label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants