Skip to content

Commit dad84a1

Browse files
committed
Fix #111. Create confirmed dialog before setting remote description.
Thanks to @wakamoleguy and @gavllew
1 parent 15d83bb commit dad84a1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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.3-devel",
5+
"version": "0.3.4-devel",
66
"homepage": "http://jssip.net",
77
"author": "José Luis Millán <jmillan@aliax.net>",
88
"contributors": [

src/RTCSession.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,11 @@ RTCSession.prototype.receiveResponse = function(response) {
840840
break;
841841
}
842842

843+
// An error on dialog creation will fire 'failed' event
844+
if (!this.createDialog(response, 'UAC')) {
845+
break;
846+
}
847+
843848
this.rtcMediaHandler.onMessage(
844849
'answer',
845850
response.body,
@@ -848,11 +853,6 @@ RTCSession.prototype.receiveResponse = function(response) {
848853
* SDP Answer fits with Offer. Media will start
849854
*/
850855
function() {
851-
// An error on dialog creation will fire 'failed' event
852-
if (!session.createDialog(response, 'UAC')) {
853-
return;
854-
}
855-
856856
session.sendACK();
857857
session.status = C.STATUS_CONFIRMED;
858858
session.started('remote', response);

0 commit comments

Comments
 (0)