Skip to content
Permalink
Browse files

Fix #112. Enhance CANCEL request processing

  • Loading branch information
jmillan committed Jun 26, 2013
1 parent 1740e5e commit 3e84eaf79d01d3681a418617f3e3f3ca3d95f45a
Showing with 3 additions and 5 deletions.
  1. +1 −1 package.json
  2. +1 −3 src/RTCSession.js
  3. +1 −0 src/Transactions.js
  4. +0 −1 src/UA.js
@@ -2,7 +2,7 @@
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.3.5",
"version": "0.3.6",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net>",
"contributors": [
@@ -671,15 +671,13 @@ RTCSession.prototype.receiveRequest = function(request) {
* established.
*/

// Reply 487
this.request.reply(487);

/*
* Terminate the whole session in case the user didn't accept nor reject the
*request opening the session.
*/
if(this.status === C.STATUS_WAITING_FOR_ANSWER) {
this.status = C.STATUS_CANCELED;
this.request.reply(487);
this.failed('remote', request, JsSIP.C.causes.CANCELED);
}
} else {
@@ -635,6 +635,7 @@ Transactions.checkTransaction = function(ua, request) {
case JsSIP.C.CANCEL:
tr = ua.transactions.ist[request.via_branch];
if(tr) {
request.reply_sl(200);
if(tr.state === C.STATUS_PROCEEDING) {
return false;
} else {
@@ -460,7 +460,6 @@ UA.prototype.receiveRequest = function(request) {
request.reply(481);
break;
case JsSIP.C.CANCEL:
request.reply(200);
session = this.findSession(request);
if(session) {
session.receiveRequest(request);

0 comments on commit 3e84eaf

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