Skip to content
Permalink
Browse files

Fix #111. Create confirmed dialog before setting remote description.

Thanks to @wakamoleguy and @gavllew
  • Loading branch information
jmillan committed Jun 15, 2013
1 parent 15d83bb commit dad84a1940f7339cf363a2fb245bbd103254e111
Showing with 6 additions and 6 deletions.
  1. +1 −1 package.json
  2. +5 −5 src/RTCSession.js
@@ -2,7 +2,7 @@
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.3.3-devel",
"version": "0.3.4-devel",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net>",
"contributors": [
@@ -840,6 +840,11 @@ RTCSession.prototype.receiveResponse = function(response) {
break;
}

// An error on dialog creation will fire 'failed' event
if (!this.createDialog(response, 'UAC')) {
break;
}

this.rtcMediaHandler.onMessage(
'answer',
response.body,
@@ -848,11 +853,6 @@ RTCSession.prototype.receiveResponse = function(response) {
* SDP Answer fits with Offer. Media will start
*/
function() {
// An error on dialog creation will fire 'failed' event
if (!session.createDialog(response, 'UAC')) {
return;
}

session.sendACK();
session.status = C.STATUS_CONFIRMED;
session.started('remote', response);

0 comments on commit dad84a1

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