Skip to content

Commit

Permalink
0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Aug 10, 2015
1 parent d6a86e0 commit 2b70a84
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 34 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

Version 0.7.4 (released in 2015-08-10)
---------------------------------------

* Allow rejecting an in-dialog INVITE or UPDATE message


Version 0.7.3 (released in 2015-07-29)
---------------------------------------

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.3",
"version": "0.7.4",
"description": "the Javascript SIP library",
"main": "dist/jssip.js",
"homepage": "http://jssip.net",
Expand Down
16 changes: 0 additions & 16 deletions dist/jssip-0.7.3.min.js

This file was deleted.

66 changes: 58 additions & 8 deletions dist/jssip-0.7.3.js → dist/jssip-0.7.4.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* JsSIP v0.7.3
* JsSIP v0.7.4
* the Javascript SIP library
* Copyright: 2012-2015 José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)
* Homepage: http://jssip.net
Expand Down Expand Up @@ -15530,19 +15530,44 @@ function receiveReinvite(request) {
debug('receiveReinvite()');

var
sdp, idx, direction,
sdp, idx, direction, m,
self = this,
contentType = request.getHeader('Content-Type'),
m,
hold = false,
rejected = false,
data = {
request: request,
callback: undefined
callback: undefined,
reject: reject.bind(this)
};

function reject(options) {
options = options || {};
rejected = true;

var
status_code = options.status_code || 403,
reason_phrase = options.reason_phrase || '',
extraHeaders = options.extraHeaders && options.extraHeaders.slice() || [];

if (this.status !== C.STATUS_CONFIRMED) {
return false;
}

if (status_code < 300 || status_code >= 700) {
throw new TypeError('Invalid status_code: '+ status_code);
}

request.reply(status_code, reason_phrase, extraHeaders);
}

// Emit 'reinvite'.
this.emit('reinvite', data);

if (rejected) {
return;
}

if (request.body) {
this.late_sdp = false;
if (contentType !== 'application/sdp') {
Expand Down Expand Up @@ -15642,19 +15667,44 @@ function receiveUpdate(request) {
debug('receiveUpdate()');

var
sdp, idx, direction,
sdp, idx, direction, m,
self = this,
contentType = request.getHeader('Content-Type'),
m,
rejected = false,
hold = false,
data = {
request: request,
callback: undefined
callback: undefined,
reject: reject.bind(this)
};

function reject(options) {
options = options || {};
rejected = true;

var
status_code = options.status_code || 403,
reason_phrase = options.reason_phrase || '',
extraHeaders = options.extraHeaders && options.extraHeaders.slice() || [];

if (this.status !== C.STATUS_CONFIRMED) {
return false;
}

if (status_code < 300 || status_code >= 700) {
throw new TypeError('Invalid status_code: '+ status_code);
}

request.reply(status_code, reason_phrase, extraHeaders);
}

// Emit 'update'.
this.emit('update', data);

if (rejected) {
return;
}

if (! request.body) {
var extraHeaders = [];
handleSessionTimersInIncomingRequest.call(this, request, extraHeaders);
Expand Down Expand Up @@ -25072,7 +25122,7 @@ module.exports={
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.7.3",
"version": "0.7.4",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"contributors": [
Expand Down
17 changes: 17 additions & 0 deletions dist/jssip-0.7.4.min.js

Large diffs are not rendered by default.

58 changes: 50 additions & 8 deletions dist/jssip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* JsSIP v0.7.3
* JsSIP v0.7.4
* the Javascript SIP library
* Copyright: 2012-2015 José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)
* Homepage: http://jssip.net
Expand Down Expand Up @@ -15530,19 +15530,40 @@ function receiveReinvite(request) {
debug('receiveReinvite()');

var
sdp, idx, direction,
sdp, idx, direction, m,
self = this,
contentType = request.getHeader('Content-Type'),
m,
hold = false,
rejected = false,
data = {
request: request,
callback: undefined
callback: undefined,
reject: reject
};

function reject(options) {
options = options || {};
rejected = true;

var
status_code = options.status_code || 403,
reason_phrase = options.reason_phrase || '',
extraHeaders = options.extraHeaders && options.extraHeaders.slice() || [];

if (status_code < 300 || status_code >= 700) {
throw new TypeError('Invalid status_code: '+ status_code);
}

request.reply(status_code, reason_phrase, extraHeaders);
}

// Emit 'reinvite'.
this.emit('reinvite', data);

if (rejected) {
return;
}

if (request.body) {
this.late_sdp = false;
if (contentType !== 'application/sdp') {
Expand Down Expand Up @@ -15642,19 +15663,40 @@ function receiveUpdate(request) {
debug('receiveUpdate()');

var
sdp, idx, direction,
sdp, idx, direction, m,
self = this,
contentType = request.getHeader('Content-Type'),
m,
rejected = false,
hold = false,
data = {
request: request,
callback: undefined
callback: undefined,
reject: reject
};

function reject(options) {
options = options || {};
rejected = true;

var
status_code = options.status_code || 403,
reason_phrase = options.reason_phrase || '',
extraHeaders = options.extraHeaders && options.extraHeaders.slice() || [];

if (status_code < 300 || status_code >= 700) {
throw new TypeError('Invalid status_code: '+ status_code);
}

request.reply(status_code, reason_phrase, extraHeaders);
}

// Emit 'update'.
this.emit('update', data);

if (rejected) {
return;
}

if (! request.body) {
var extraHeaders = [];
handleSessionTimersInIncomingRequest.call(this, request, extraHeaders);
Expand Down Expand Up @@ -25072,7 +25114,7 @@ module.exports={
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.7.3",
"version": "0.7.4",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"contributors": [
Expand Down
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.3",
"version": "0.7.4",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"contributors": [
Expand Down

0 comments on commit 2b70a84

Please sign in to comment.