Skip to content
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

Incoming CANCEL transaction are never removed from ua.transactions.nist #248

Closed
ibc opened this issue Sep 26, 2014 · 2 comments
Closed

Incoming CANCEL transaction are never removed from ua.transactions.nist #248

ibc opened this issue Sep 26, 2014 · 2 comments
Assignees

Comments

@ibc
Copy link
Member

ibc commented Sep 26, 2014

  • Receive an INVITE.
  • Ring.
  • Caller sends CANCEL.
  • We reply 200 Cancelling and 487 and receive ACK as usual.

After that, and forever and ever, the corresponding CANCEL non INVITE transaction remains forever on ua.transactions.nist.

This prevents UA.stop() to work because it relies on nist to be 0 before it disconnects the transport:

/*
   * If the remaining transactions are all INVITE transactions, there is no need to
   * wait anymore because every session has already been closed by this method.
   * - locally originated sessions where terminated (CANCEL or BYE)
   * - remotely originated sessions where rejected (4XX) or terminated (BYE)
   * Remaining INVITE transactions belong tho sessions that where answered. This are in
   * 'accepted' state due to timers 'L' and 'M' defined in [RFC 6026]
   */
  if (this.nistTransactionsCount === 0 && this.nictTransactionsCount === 0) {
    this.transport.disconnect();
  } else {
    this.on('transactionDestroyed', transactionsListener);
  }
@ibc ibc self-assigned this Sep 26, 2014
@ibc ibc changed the title UA.stop() does not work when an INVITE server transaction still exists but already ended Incoming CANCEL transaction are never removed from ua.transactions.nist Sep 26, 2014
@ibc
Copy link
Member Author

ibc commented Sep 26, 2014

This is because UA.destroyTransaction() is never called for the incoming CANCEL.

@ibc
Copy link
Member Author

ibc commented Sep 26, 2014

The problem is that IncomingRequest.prototype.reply_sl() is used to reply the 200 to the CANCEL, and reply_sl does not notify the server transaction so it remains in nist forever.

@ibc ibc closed this as completed in 177f38d Sep 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant