Skip to content

Commit 3e84eaf

Browse files
committed
Fix #112. Enhance CANCEL request processing
1 parent 1740e5e commit 3e84eaf

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "jssip",
33
"title": "JsSIP",
44
"description": "the Javascript SIP library",
5-
"version": "0.3.5",
5+
"version": "0.3.6",
66
"homepage": "http://jssip.net",
77
"author": "José Luis Millán <jmillan@aliax.net>",
88
"contributors": [

Diff for: src/RTCSession.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -671,15 +671,13 @@ RTCSession.prototype.receiveRequest = function(request) {
671671
* established.
672672
*/
673673

674-
// Reply 487
675-
this.request.reply(487);
676-
677674
/*
678675
* Terminate the whole session in case the user didn't accept nor reject the
679676
*request opening the session.
680677
*/
681678
if(this.status === C.STATUS_WAITING_FOR_ANSWER) {
682679
this.status = C.STATUS_CANCELED;
680+
this.request.reply(487);
683681
this.failed('remote', request, JsSIP.C.causes.CANCELED);
684682
}
685683
} else {

Diff for: src/Transactions.js

+1
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ Transactions.checkTransaction = function(ua, request) {
635635
case JsSIP.C.CANCEL:
636636
tr = ua.transactions.ist[request.via_branch];
637637
if(tr) {
638+
request.reply_sl(200);
638639
if(tr.state === C.STATUS_PROCEEDING) {
639640
return false;
640641
} else {

Diff for: src/UA.js

-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ UA.prototype.receiveRequest = function(request) {
460460
request.reply(481);
461461
break;
462462
case JsSIP.C.CANCEL:
463-
request.reply(200);
464463
session = this.findSession(request);
465464
if(session) {
466465
session.receiveRequest(request);

0 commit comments

Comments
 (0)