Skip to content

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

@linguyen1803

Description

@linguyen1803

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions