JsSIP icon indicating copy to clipboard operation
JsSIP copied to clipboard

Session does not trigger ended or failed event when receiving BYE message

Open linguyen1803 opened this issue 2 months ago • 0 comments

Jssip version: 3.10.0

When the server sends a BYE message after a race condition between INVITE, CANCEL, and 200 OK, the JsSIP session does not fire the ended or failed event. As a result, my application UI stays in an incorrect state (it still thinks the call is ongoing).

Flow: Server sends INVITE to JsSIP client.

JsSIP responds with 200 OK.

At almost the same time, the server sends a CANCEL.

JsSIP responds with 200 OK for the CANCEL request.

Server sends ACK.

Server then sends a BYE.

JsSIP responds with: SIP/2.0 481 Call/Transaction Does Not Exist

After sending 481 Call/Transaction Does Not Exist, the JsSIP session does not fire ended or failed events.

Is there any event or callback that can be used to detect when: The server sends a BYE message, or JsSIP sends a 481 Call/Transaction Does Not Exist response? If not, what would be the best way to handle this edge case gracefully?

linguyen1803 avatar Nov 11 '25 08:11 linguyen1803