Skip to content
Permalink
Browse files

Small Fix. Reply '200' to a CANCEL 'before' replying 487 to the INVITE

- The order was inverted
  • Loading branch information
jmillan committed Feb 20, 2013
1 parent d64168a commit 1b1ab739943fb5fd07f99367108fdbfe3bc9a83e
Showing with 3 additions and 5 deletions.
  1. +2 −4 src/Session.js
  2. +0 −1 src/Transactions.js
  3. +1 −0 src/UA.js
@@ -305,10 +305,8 @@ JsSIP.Session.prototype.receiveRequest = function(request) {
* established.
*/

// Transaction layer already responded 487 to the initial request.

// Reply 200 to CANCEL
request.reply(200);
// Reply 487
this.request.reply(487);

/*
* Terminate the whole session in case the user didn't accept nor reject the
@@ -622,7 +622,6 @@ JsSIP.Transactions.checkTransaction = function(ua, request) {
tr = ua.transactions.ist[request.via_branch];
if(tr) {
if(tr.state === JsSIP.C.TRANSACTION_PROCEEDING) {
tr.request.reply(487);
return false;
} else {
return true;
@@ -418,6 +418,7 @@ JsSIP.UA.prototype.receiveRequest = function(request) {
request.reply(481);
break;
case JsSIP.C.CANCEL:
request.reply(200);

This comment has been minimized.

Copy link
@ibc

ibc Feb 20, 2013

Member

Y U REPLY 200 ALWAYS?

What about if the INVITE server transaction does not exist?

This comment has been minimized.

Copy link
@jmillan

jmillan Feb 20, 2013

Author Member

No response is sent if the transaction does not exist.

https://github.com/versatica/JsSIP/blob/master/src/Transactions.js#L624

This comment has been minimized.

Copy link
@ibc

ibc Feb 20, 2013

Member

I was so wrong... XD

This comment has been minimized.

Copy link
@jmillan

jmillan Feb 20, 2013

Author Member

No problem, the diff invites to think so xD

session = this.findSession(request);
if(session) {
session.receiveRequest(request);

0 comments on commit 1b1ab73

Please sign in to comment.
You can’t perform that action at this time.