Skip to content

Commit

Permalink
RTCSession: set the correct cause on events..
Browse files Browse the repository at this point in the history
..,request timeout, transport error and dialog error
  • Loading branch information
jmillan committed Feb 5, 2015
1 parent 0ddf7e0 commit 2cbebf5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/RTCSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,8 @@ RTCSession.prototype.onTransportError = function() {
if(this.status !== C.STATUS_TERMINATED) {
this.terminate({
status_code: 500,
reason_phrase: JsSIP_C.causes.CONNECTION_ERROR
reason_phrase: JsSIP_C.causes.CONNECTION_ERROR,
cause: JsSIP_C.causes.CONNECTION_ERROR
});
}
};
Expand All @@ -1236,7 +1237,8 @@ RTCSession.prototype.onRequestTimeout = function() {
if(this.status !== C.STATUS_TERMINATED) {
this.terminate({
status_code: 408,
reason_phrase: JsSIP_C.causes.REQUEST_TIMEOUT
reason_phrase: JsSIP_C.causes.REQUEST_TIMEOUT,
cause: JsSIP_C.causes.REQUEST_TIMEOUT
});
}
};
Expand All @@ -1248,7 +1250,8 @@ RTCSession.prototype.onDialogError = function() {
if(this.status !== C.STATUS_TERMINATED) {
this.terminate({
status_code: 500,
reason_phrase: JsSIP_C.causes.DIALOG_ERROR
reason_phrase: JsSIP_C.causes.DIALOG_ERROR,
cause: JsSIP_C.causes.DIALOG_ERROR
});
}
};
Expand Down

0 comments on commit 2cbebf5

Please sign in to comment.