Skip to content

Commit

Permalink
0.7.22
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Apr 6, 2016
1 parent 68f0af8 commit 50fc749
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 38 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
CHANGELOG
=========

Version 0.7.22 (released in XXXX-XX-XX)
Version 0.7.22 (released in 2016-04-06)
---------------------------------------

* `UA`: `set()` allows changing user's display name.
* Ignore SDP answer in received ACK retransmissions (fix [367](https://github.com/versatica/JsSIP/issues/367)).


Version 0.7.21 (released in 2016-04-05)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jssip",
"version": "0.7.22-pre",
"version": "0.7.22",
"description": "the Javascript SIP library",
"main": "dist/jssip.js",
"homepage": "http://jssip.net",
Expand Down
88 changes: 58 additions & 30 deletions dist/jssip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* JsSIP v0.7.21
* JsSIP v0.7.22
* the Javascript SIP library
* Copyright: 2012-2016 José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)
* Homepage: http://jssip.net
Expand Down Expand Up @@ -15227,36 +15227,48 @@ RTCSession.prototype.receiveRequest = function(request) {
// Requests arriving here are in-dialog requests.
switch(request.method) {
case JsSIP_C.ACK:
if(this.status === C.STATUS_WAITING_FOR_ACK) {
clearTimeout(this.timers.ackTimer);
clearTimeout(this.timers.invite2xxTimer);
if (this.status !== C.STATUS_WAITING_FOR_ACK) {
return;
}

if (this.late_sdp) {
if (!request.body) {
ended.call(this, 'remote', request, JsSIP_C.causes.MISSING_SDP);
break;
}
// Update signaling status.
this.status = C.STATUS_CONFIRMED;

this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'answer', sdp:request.body}),
// success
function() {
self.status = C.STATUS_CONFIRMED;
},
// failure
function() {
ended.call(self, 'remote', request, JsSIP_C.causes.BAD_MEDIA_DESCRIPTION);
}
);
}
else {
this.status = C.STATUS_CONFIRMED;
clearTimeout(this.timers.ackTimer);
clearTimeout(this.timers.invite2xxTimer);

if (this.late_sdp) {
if (!request.body) {
this.terminate({
cause: JsSIP_C.causes.MISSING_SDP,
status_code: 400
});
break;
}

if (this.status === C.STATUS_CONFIRMED && !this.is_confirmed) {
this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'answer', sdp:request.body}),
// success
function() {
if (!self.is_confirmed) {
confirmed.call(self, 'remote', request);
}
},
// failure
function() {
self.terminate({
cause: JsSIP_C.causes.BAD_MEDIA_DESCRIPTION,
status_code: 488
});
}
);
}
else {
if (!this.is_confirmed) {
confirmed.call(this, 'remote', request);
}
}

break;
case JsSIP_C.BYE:
if(this.status === C.STATUS_CONFIRMED) {
Expand Down Expand Up @@ -19752,19 +19764,31 @@ UA.prototype.get = function(parameter) {
*/
UA.prototype.set = function(parameter, value) {
switch(parameter) {
case 'password':
case 'password': {
this.configuration.password = String(value);
break;
}

case 'realm':
case 'realm': {
this.configuration.realm = String(value);
break;
}

case 'ha1':
case 'ha1': {
this.configuration.ha1 = String(value);
// Delete the plain SIP password.
this.configuration.password = null;
break;
}

case 'display_name': {
if (Grammar.parse('"' + value + '"', 'display_name') === -1) {
debugerror('set() | wrong "display_name"');
return false;
}
this.configuration.display_name = value;
break;
}

default:
debugerror('set() | cannot set "%s" parameter in runtime', parameter);
Expand Down Expand Up @@ -20462,10 +20486,14 @@ UA.configuration_skeleton = (function() {
'via_host'
];

var writable_parameters = [
'password', 'realm', 'ha1', 'display_name'
];

for(idx in parameters) {
parameter = parameters[idx];

if (['password', 'realm', 'ha1'].indexOf(parameter) !== -1) {
if (writable_parameters.indexOf(parameter) !== -1) {
writable = true;
} else {
writable = false;
Expand Down Expand Up @@ -20601,7 +20629,7 @@ UA.configuration_check = {
},

display_name: function(display_name) {
if(Grammar.parse('"' + display_name + '"', 'display_name') === -1) {
if (Grammar.parse('"' + display_name + '"', 'display_name') === -1) {
return;
} else {
return display_name;
Expand Down Expand Up @@ -23676,7 +23704,7 @@ module.exports={
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.7.21",
"version": "0.7.22",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"contributors": [
Expand Down
10 changes: 5 additions & 5 deletions dist/jssip.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.7.22-pre",
"version": "0.7.22",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"contributors": [
Expand Down

0 comments on commit 50fc749

Please sign in to comment.