Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Publish the parser grammar

- rename the grammar module from 'grammar_sip' to 'grammar'
- rename the grammar file from 'grammar_rfc3261.js' to 'grammar.js'
- Adapt the code in JsSIP to the module name
  • Loading branch information...
commit a935ad2af15576b8fb7cae2a62db0ce9c23b1ef2 1 parent 6d3afac
@jmillan jmillan authored
View
4 grunt.js
@@ -42,14 +42,14 @@ module.exports = function(grunt) {
post: {
src: [
'dist/<%= pkg.name %>-<%= pkg.version %>.js',
- "src/grammar/grammar_rfc3261.js"
+ "src/grammar/dist/grammar.js"
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
},
post_min: {
src: [
'dist/<%= pkg.name %>-<%= pkg.version %>.min.js',
- "src/grammar/grammar_rfc3261.min.js"
+ "src/grammar/dist/grammar.min.js"
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
}
View
2  src/Parser.js
@@ -171,7 +171,7 @@ JsSIP.Parser = (function() {
// Parse first line. Check if it is a Request or a Reply.
firstLine = data.substring(0, header_end);
- parsed = JsSIP.grammar_sip.parse(firstLine, 'Request_Response');
+ parsed = JsSIP.grammar.parse(firstLine, 'Request_Response');
if(parsed === -1) {
console.log(JsSIP.c.LOG_PARSER +'Error parsing first line of SIP message: "' + firstLine + '"');
View
2  src/SIPMessage.js
@@ -282,7 +282,7 @@ JsSIP.IncomingMessage.prototype = {
//substitute '-' by '_' for grammar rule matching.
name = name.replace(/-/g, '_');
- parsed = JsSIP.grammar_sip.parse(value, name);
+ parsed = JsSIP.grammar.parse(value, name);
if(parsed === -1) {
this.headers[name].splice(idx, 1); //delete from headers
View
16 src/UA.js
@@ -635,7 +635,7 @@ JsSIP.UA.prototype.loadConfig = function(configuration) {
//for this instance.
settings.jssip_id = Math.random().toString(36).substr(2, 5);
- uri = JsSIP.grammar_sip.parse(settings.uri, 'lazy_uri');
+ uri = JsSIP.grammar.parse(settings.uri, 'lazy_uri');
settings.user = uri.user;
settings.domain = uri.host;
@@ -662,7 +662,7 @@ JsSIP.UA.prototype.loadConfig = function(configuration) {
// Transports
for (idx in configuration.outbound_proxy_set) {
- ws_uri = JsSIP.grammar_sip.parse(settings.outbound_proxy_set[idx].ws_uri, 'absoluteURI');
+ ws_uri = JsSIP.grammar.parse(settings.outbound_proxy_set[idx].ws_uri, 'absoluteURI');
settings.outbound_proxy_set[idx].sip_uri = '<sip:' + ws_uri.host + (ws_uri.port ? ':' + ws_uri.port : '') + ';transport=ws;lr>';
@@ -776,7 +776,7 @@ JsSIP.UA.configuration_check = {
return false;
}
- url = JsSIP.grammar_sip.parse(outbound_proxy_set[idx].ws_uri, 'absoluteURI');
+ url = JsSIP.grammar.parse(outbound_proxy_set[idx].ws_uri, 'absoluteURI');
if(url === -1) {
console.log(JsSIP.c.LOG_UA +'Invalid "ws_uri" attribute in outbound_proxy_set parameter: ' + outbound_proxy_set[idx].ws_uri);
@@ -791,7 +791,7 @@ JsSIP.UA.configuration_check = {
uri: function(uri) {
var parsed;
- parsed = JsSIP.grammar_sip.parse(uri, 'lazy_uri');
+ parsed = JsSIP.grammar.parse(uri, 'lazy_uri');
if(parsed === -1) {
console.log(JsSIP.c.LOG_UA +'Invalid uri: ' + uri);
@@ -804,7 +804,7 @@ JsSIP.UA.configuration_check = {
}
},
password: function(password) {
- if(JsSIP.grammar_sip.parse(password, 'password') === -1) {
+ if(JsSIP.grammar.parse(password, 'password') === -1) {
return false;
} else {
return true;
@@ -813,7 +813,7 @@ JsSIP.UA.configuration_check = {
},
optional: {
authorization_user: function(authorization_user) {
- if(JsSIP.grammar_sip.parse('"'+ authorization_user +'"', 'quoted_string') === -1) {
+ if(JsSIP.grammar.parse('"'+ authorization_user +'"', 'quoted_string') === -1) {
return false;
} else {
return true;
@@ -828,7 +828,7 @@ JsSIP.UA.configuration_check = {
}
},
display_name: function(display_name) {
- if(JsSIP.grammar_sip.parse(display_name, 'display_name') === -1) {
+ if(JsSIP.grammar.parse(display_name, 'display_name') === -1) {
return false;
} else {
return true;
@@ -844,7 +844,7 @@ JsSIP.UA.configuration_check = {
stun_server: function(stun_server) {
var parsed;
- parsed = JsSIP.grammar_sip.parse(stun_server, 'hostport');
+ parsed = JsSIP.grammar.parse(stun_server, 'hostport');
if(parsed === -1) {
console.log(JsSIP.c.LOG_UA +'Invalid stun_server: ' + stun_server);
View
72 src/grammar/README.md
@@ -0,0 +1,72 @@
+JsSIP Parser Grammar
+======================
+
+JsSIP uses [PEG.js](https://github.com/dmajda/pegjs) to build its parser grammar, a PEG based parser generator for JavaScript.
+
+The grammar source is defined in PEG format in `src/grammar.pegjs` file. It must be converted to JavaScript by using PEG.js
+
+
+PEG.js Installation
+------------------
+
+In order to use the `pegjs` node command, install PEG.js globally:
+
+ $ npm install -g pegjs
+
+
+Generating the grammar parser from the grammar source
+-----------------------------------------------------
+
+The following command converts the PEG grammar into a JsSIP module named `grammar`. The output file is created in `dist/grammar.js`.
+
+ $ pegjs -e JsSIP.grammar src/grammar.pegjs dist/grammar.js
+
+In case there is an error in the grammar, the command will throw a descriptive error.
+
+Once compiled, there are couple of changes that need to be done in `dist/grammar.js`. This is because the PEG.js grammar parser, by default, returns an Array (representing a splitted version of the input) if the input matched the given rule, but JsSIP `grammar.pegjs` generates internally a SIP Header Oject instead and this is what JsSIP expects as the result of the `grammar.parse()` function.
+
+The changes to be done in `dist/grammar.js` file are located at the end of the `parse()` function, just where it returns the Array for successful parsing or throws an exception for parsing error:
+
+* Return `-1` instead of throwing an exception for a parsing error.
+* Return expected `msg` object instead of the default Array for a successful parsing.
+
+```
+ if (result === null || pos !== input.length) {
+ var offset = Math.max(pos, rightmostFailuresPos);
+ var found = offset < input.length ? input.charAt(offset) : null;
+ var errorPosition = computeErrorPosition();
+
+- throw new this.SyntaxError(`
++ new this.SyntaxError(
+ cleanupExpected(rightmostFailuresExpected),
+ found,
+ offset,
+ errorPosition.line,
+ errorPosition.column
+ );
+
++ return -1;
+ }
+
+- return result;
++ return msg;
+ },
+
+ /* Returns the parser source code. */
+ toSource: function() { return this._source; }
+```
+
+Minifying the grammar parser
+-----------------------------
+
+[node-minify](https://github.com/srod/node-minify) is used in order to minify the generated grammar.
+
+Install node-minify
+
+ $ npm install node-minify
+
+Run the `minify.js` script with node command to minimize the grammar.
+
+ $ node minify.js
+
+This will generate the `dist/grammar.min.js` file.
View
1,146 src/grammar/grammar_rfc3261.js → src/grammar/dist/grammar.js
@@ -1,10 +1,10 @@
-JsSIP.grammar_sip = (function(){
+JsSIP.grammar = (function(){
/*
* Generated by PEG.js 0.7.0.
*
* http://pegjs.majda.cz/
*/
-
+
function quote(s) {
/*
* ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a
@@ -16,18 +16,18 @@ JsSIP.grammar_sip = (function(){
* characters. Note that "\0" and "\v" escape sequences are not used
* because JSHint does not like the first and IE the second.
*/
- return '"' + s
- .replace(/\\/g, '\\\\') // backslash
- .replace(/"/g, '\\"') // closing quote character
- .replace(/\x08/g, '\\b') // backspace
- .replace(/\t/g, '\\t') // horizontal tab
- .replace(/\n/g, '\\n') // line feed
- .replace(/\f/g, '\\f') // form feed
- .replace(/\r/g, '\\r') // carriage return
- .replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g, escape)
- + '"';
+ return '"' + s
+ .replace(/\\/g, '\\\\') // backslash
+ .replace(/"/g, '\\"') // closing quote character
+ .replace(/\x08/g, '\\b') // backspace
+ .replace(/\t/g, '\\t') // horizontal tab
+ .replace(/\n/g, '\\n') // line feed
+ .replace(/\f/g, '\\f') // form feed
+ .replace(/\r/g, '\\r') // carriage return
+ .replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g, escape)
+ + '"';
}
-
+
var result = {
/*
* Parses the input with a generated parser. If the parsing is successfull,
@@ -244,7 +244,7 @@ JsSIP.grammar_sip = (function(){
"message_body": parse_message_body,
"lazy_uri": parse_lazy_uri
};
-
+
if (startRule !== undefined) {
if (parseFunctions[startRule] === undefined) {
throw new Error("Invalid rule name: " + quote(startRule) + ".");
@@ -252,28 +252,28 @@ JsSIP.grammar_sip = (function(){
} else {
startRule = "CRLF";
}
-
+
var pos = 0;
var reportFailures = 0;
var rightmostFailuresPos = 0;
var rightmostFailuresExpected = [];
-
+
function padLeft(input, padding, length) {
var result = input;
-
+
var padLength = length - input.length;
for (var i = 0; i < padLength; i++) {
result = padding + result;
}
-
+
return result;
}
-
+
function escape(ch) {
var charCode = ch.charCodeAt(0);
var escapeChar;
var length;
-
+
if (charCode <= 0xFF) {
escapeChar = 'x';
length = 2;
@@ -281,26 +281,26 @@ JsSIP.grammar_sip = (function(){
escapeChar = 'u';
length = 4;
}
-
+
return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length);
}
-
+
function matchFailed(failure) {
if (pos < rightmostFailuresPos) {
return;
}
-
+
if (pos > rightmostFailuresPos) {
rightmostFailuresPos = pos;
rightmostFailuresExpected = [];
}
-
+
rightmostFailuresExpected.push(failure);
}
-
+
function parse_CRLF() {
var result0;
-
+
if (input.substr(pos, 2) === "\r\n") {
result0 = "\r\n";
pos += 2;
@@ -312,10 +312,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_DIGIT() {
var result0;
-
+
if (/^[0-9]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -327,10 +327,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_ALPHA() {
var result0;
-
+
if (/^[a-zA-Z]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -342,10 +342,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_HEXDIG() {
var result0;
-
+
if (/^[0-9a-fA-F]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -357,20 +357,20 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_WSP() {
var result0;
-
+
result0 = parse_SP();
if (result0 === null) {
result0 = parse_HTAB();
}
return result0;
}
-
+
function parse_OCTET() {
var result0;
-
+
if (/^[\0-\xFF]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -382,10 +382,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_DQUOTE() {
var result0;
-
+
if (/^["]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -397,10 +397,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SP() {
var result0;
-
+
if (input.charCodeAt(pos) === 32) {
result0 = " ";
pos++;
@@ -412,10 +412,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_HTAB() {
var result0;
-
+
if (input.charCodeAt(pos) === 9) {
result0 = "\t";
pos++;
@@ -427,10 +427,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_alphanum() {
var result0;
-
+
if (/^[a-zA-Z0-9]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -442,10 +442,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_reserved() {
var result0;
-
+
if (input.charCodeAt(pos) === 59) {
result0 = ";";
pos++;
@@ -556,20 +556,20 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_unreserved() {
var result0;
-
+
result0 = parse_alphanum();
if (result0 === null) {
result0 = parse_mark();
}
return result0;
}
-
+
function parse_mark() {
var result0;
-
+
if (input.charCodeAt(pos) === 45) {
result0 = "-";
pos++;
@@ -669,11 +669,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_escaped() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
if (input.charCodeAt(pos) === 37) {
result0 = "%";
@@ -704,11 +704,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_LWS() {
var result0, result1, result2;
var pos0, pos1, pos2;
-
+
pos0 = pos;
pos1 = pos;
pos2 = pos;
@@ -760,19 +760,19 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SWS() {
var result0;
-
+
result0 = parse_LWS();
result0 = result0 !== null ? result0 : "";
return result0;
}
-
+
function parse_HCOLON() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = [];
@@ -821,11 +821,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_TEXT_UTF8_TRIM() {
var result0, result1, result2, result3;
var pos0, pos1, pos2;
-
+
pos0 = pos;
pos1 = pos;
result1 = parse_TEXT_UTF8char();
@@ -893,17 +893,17 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- return input.substring(pos, offset); })(pos0);
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_TEXT_UTF8char() {
var result0;
-
+
if (/^[!-~]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -918,10 +918,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_UTF8_NONASCII() {
var result0;
-
+
if (/^[\x80-\xFF]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -933,10 +933,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_UTF8_CONT() {
var result0;
-
+
if (/^[\x80-\xBF]/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -948,10 +948,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_LHEX() {
var result0;
-
+
result0 = parse_DIGIT();
if (result0 === null) {
if (/^[a-f]/.test(input.charAt(pos))) {
@@ -966,11 +966,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_token() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result1 = parse_alphanum();
if (result1 === null) {
@@ -1204,18 +1204,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- return input.substring(pos, offset); })(pos0);
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_token_nodot() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result1 = parse_alphanum();
if (result1 === null) {
@@ -1427,17 +1427,17 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- return input.substring(pos, offset); })(pos0);
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_separators() {
var result0;
-
+
if (input.charCodeAt(pos) === 40) {
result0 = "(";
pos++;
@@ -1623,11 +1623,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_word() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result1 = parse_alphanum();
if (result1 === null) {
@@ -2131,18 +2131,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- return input.substring(pos, offset); })(pos0);
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_STAR() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2180,11 +2180,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SLASH() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2222,11 +2222,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_EQUAL() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2264,11 +2264,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_LPAREN() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2306,11 +2306,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_RPAREN() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2348,11 +2348,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_RAQUOT() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.charCodeAt(pos) === 62) {
@@ -2384,11 +2384,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_LAQUOT() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2420,11 +2420,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_COMMA() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2462,11 +2462,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SEMI() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2504,11 +2504,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_COLON() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2546,11 +2546,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_LDQUOT() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2574,11 +2574,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_RDQUOT() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_DQUOTE();
@@ -2602,11 +2602,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_comment() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
result0 = parse_LPAREN();
if (result0 !== null) {
@@ -2646,10 +2646,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_ctext() {
var result0;
-
+
if (/^[!-']/.test(input.charAt(pos))) {
result0 = input.charAt(pos);
pos++;
@@ -2689,11 +2689,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_quoted_string() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_SWS();
@@ -2734,17 +2734,17 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- return input.substring(pos, offset); })(pos0);
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_qdtext() {
var result0;
-
+
result0 = parse_LWS();
if (result0 === null) {
if (input.charCodeAt(pos) === 33) {
@@ -2784,11 +2784,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_quoted_pair() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
if (input.charCodeAt(pos) === 92) {
result0 = "\\";
@@ -2843,11 +2843,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SIP_URI_simple() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_uri_scheme();
@@ -2886,18 +2886,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.uri = input.substring(pos, offset); })(pos0);
+ data.uri = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_SIP_URI() {
var result0, result1, result2, result3, result4, result5;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_uri_scheme();
@@ -2949,18 +2949,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.uri = input.substring(pos, offset); })(pos0);
+ data.uri = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_uri_scheme() {
var result0;
var pos0;
-
+
pos0 = pos;
if (input.substr(pos, 3) === "sip") {
result0 = "sip";
@@ -2973,18 +2973,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, uri_scheme) {
- msg.scheme = uri_scheme; })(pos0, result0);
+ data.scheme = uri_scheme; })(pos0, result0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_userinfo() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result0 = parse_user();
if (result0 !== null) {
@@ -3009,11 +3009,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_user() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result1 = parse_unreserved();
if (result1 === null) {
@@ -3039,17 +3039,17 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.user = input.substring(pos, offset); })(pos0);
+ data.user = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_user_unreserved() {
var result0;
-
+
if (input.charCodeAt(pos) === 38) {
result0 = "&";
pos++;
@@ -3138,10 +3138,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_password() {
var result0, result1;
-
+
result0 = [];
result1 = parse_unreserved();
if (result1 === null) {
@@ -3266,11 +3266,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_hostport() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
result0 = parse_host();
if (result0 !== null) {
@@ -3309,11 +3309,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_host() {
var result0;
var pos0;
-
+
pos0 = pos;
result0 = parse_hostname();
if (result0 === null) {
@@ -3324,18 +3324,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.host = input.substring(pos, offset); })(pos0);
+ data.host = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_hostname() {
var result0, result1, result2;
var pos0, pos1, pos2;
-
+
pos0 = pos;
pos1 = pos;
result0 = [];
@@ -3415,18 +3415,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.host_type = 'domain';
- return input.substring(pos, offset); })(pos0);
+ data.host_type = 'domain';
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_domainlabel() {
var result0, result1;
-
+
if (/^[a-zA-Z0-9_\-]/.test(input.charAt(pos))) {
result1 = input.charAt(pos);
pos++;
@@ -3455,10 +3455,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_toplabel() {
var result0, result1;
-
+
if (/^[a-zA-Z_\-]/.test(input.charAt(pos))) {
result1 = input.charAt(pos);
pos++;
@@ -3487,11 +3487,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_IPv6reference() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.charCodeAt(pos) === 91) {
@@ -3531,19 +3531,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.host_type = 'IPv6';
- return input.substring(pos, offset); })(pos0);
+ data.host_type = 'IPv6';
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_IPv6address() {
var result0, result1, result2, result3, result4, result5, result6, result7, result8, result9, result10, result11, result12;
var pos0, pos1, pos2;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_h16();
@@ -5135,19 +5135,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.host_type = 'IPv6';
- return input.substring(pos, offset); })(pos0);
+ data.host_type = 'IPv6';
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_h16() {
var result0, result1, result2, result3;
var pos0;
-
+
pos0 = pos;
result0 = parse_HEXDIG();
if (result0 !== null) {
@@ -5179,11 +5179,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_ls32() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
result0 = parse_h16();
if (result0 !== null) {
@@ -5217,11 +5217,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_IPv4address() {
var result0, result1, result2, result3, result4, result5, result6;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_dec_octet();
@@ -5293,19 +5293,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.host_type = 'IPv4';
- return input.substring(pos, offset); })(pos0);
+ data.host_type = 'IPv4';
+ return input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_dec_octet() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
if (input.substr(pos, 2) === "25") {
result0 = "25";
@@ -5433,11 +5433,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_port() {
var result0, result1, result2, result3, result4;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_DIGIT();
@@ -5478,20 +5478,20 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, port) {
- port = parseInt(port.join(""));
- msg.port = port;
- return port; })(pos0, result0);
+ port = parseInt(port.join(""));
+ data.port = port;
+ return port; })(pos0, result0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_uri_parameters() {
var result0, result1, result2;
var pos0;
-
+
result0 = [];
pos0 = pos;
if (input.charCodeAt(pos) === 59) {
@@ -5542,10 +5542,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_uri_parameter() {
var result0;
-
+
result0 = parse_transport_param();
if (result0 === null) {
result0 = parse_user_param();
@@ -5567,11 +5567,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_transport_param() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.substr(pos, 10) === "transport=") {
@@ -5641,19 +5641,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, transport) {
- if(!msg.params) msg.params={};
- msg.params['transport'] = transport; })(pos0, result0[1]);
+ if(!data.params) data.params={};
+ data.params['transport'] = transport; })(pos0, result0[1]);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_user_param() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.substr(pos, 5) === "user=") {
@@ -5701,19 +5701,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, user) {
- if(!msg.params) msg.params={};
- msg.params['user'] = user; })(pos0, result0[1]);
+ if(!data.params) data.params={};
+ data.params['user'] = user; })(pos0, result0[1]);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_method_param() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.substr(pos, 7) === "method=") {
@@ -5739,19 +5739,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, method) {
- if(!msg.params) msg.params={};
- msg.params['method'] = method; })(pos0, result0[1]);
+ if(!data.params) data.params={};
+ data.params['method'] = method; })(pos0, result0[1]);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_ttl_param() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.substr(pos, 4) === "ttl=") {
@@ -5777,19 +5777,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, ttl) {
- if(!msg.params) msg.params={};
- msg.params['ttl'] = ttl; })(pos0, result0[1]);
+ if(!data.params) data.params={};
+ data.params['ttl'] = ttl; })(pos0, result0[1]);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_maddr_param() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.substr(pos, 6) === "maddr=") {
@@ -5815,19 +5815,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, maddr) {
- if(!msg.params) msg.params={};
- msg.params['maddr'] = maddr; })(pos0, result0[1]);
+ if(!data.params) data.params={};
+ data.params['maddr'] = maddr; })(pos0, result0[1]);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_lr_param() {
var result0;
var pos0;
-
+
pos0 = pos;
if (input.substr(pos, 2) === "lr") {
result0 = "lr";
@@ -5840,19 +5840,19 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, lr) {
- if(!msg.params) msg.params={};
- msg.params['lr'] = true; })(pos0, result0);
+ if(!data.params) data.params={};
+ data.params['lr'] = true; })(pos0, result0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_other_param() {
var result0, result1, result2;
var pos0, pos1, pos2;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_pname();
@@ -5892,24 +5892,24 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset, param_name) {
- if(!msg.params) msg.params={};
- if(param_name.length === (pos - offset)) {
- msg.params[param_name] = true;
- }
- else {
- msg.params[param_name] = input.substring(pos, offset+param_name.length+1);
- }; })(pos0, result0[0]);
+ if(!data.params) data.params={};
+ if(param_name.length === (pos - offset)) {
+ data.params[param_name] = true;
+ }
+ else {
+ data.params[param_name] = input.substring(pos, offset+param_name.length+1);
+ }; })(pos0, result0[0]);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_pname() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result1 = parse_paramchar();
if (result1 !== null) {
@@ -5929,11 +5929,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_pvalue() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result1 = parse_paramchar();
if (result1 !== null) {
@@ -5953,10 +5953,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_paramchar() {
var result0;
-
+
result0 = parse_param_unreserved();
if (result0 === null) {
result0 = parse_unreserved();
@@ -5966,10 +5966,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_param_unreserved() {
var result0;
-
+
if (input.charCodeAt(pos) === 91) {
result0 = "[";
pos++;
@@ -6047,11 +6047,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_headers() {
var result0, result1, result2, result3, result4;
var pos0, pos1;
-
+
pos0 = pos;
if (input.charCodeAt(pos) === 63) {
result0 = "?";
@@ -6129,11 +6129,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_header() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
result0 = parse_hname();
if (result0 !== null) {
@@ -6164,10 +6164,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_hname() {
var result0, result1;
-
+
result1 = parse_hnv_unreserved();
if (result1 === null) {
result1 = parse_unreserved();
@@ -6192,10 +6192,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_hvalue() {
var result0, result1;
-
+
result0 = [];
result1 = parse_hnv_unreserved();
if (result1 === null) {
@@ -6216,10 +6216,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_hnv_unreserved() {
var result0;
-
+
if (input.charCodeAt(pos) === 91) {
result0 = "[";
pos++;
@@ -6297,21 +6297,21 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_Request_Response() {
var result0;
-
+
result0 = parse_Status_Line();
if (result0 === null) {
result0 = parse_Request_Line();
}
return result0;
}
-
+
function parse_Request_Line() {
var result0, result1, result2, result3, result4;
var pos0;
-
+
pos0 = pos;
result0 = parse_Method();
if (result0 !== null) {
@@ -6346,21 +6346,21 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_Request_URI() {
var result0;
-
+
result0 = parse_SIP_URI();
if (result0 === null) {
result0 = parse_absoluteURI();
}
return result0;
}
-
+
function parse_absoluteURI() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
result0 = parse_scheme();
if (result0 !== null) {
@@ -6394,11 +6394,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_hier_part() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
result0 = parse_net_path();
if (result0 === null) {
@@ -6440,11 +6440,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_net_path() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
if (input.substr(pos, 2) === "//") {
result0 = "//";
@@ -6476,11 +6476,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_abs_path() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
if (input.charCodeAt(pos) === 47) {
result0 = "/";
@@ -6505,11 +6505,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_opaque_part() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
result0 = parse_uric_no_slash();
if (result0 !== null) {
@@ -6531,10 +6531,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_uric() {
var result0;
-
+
result0 = parse_reserved();
if (result0 === null) {
result0 = parse_unreserved();
@@ -6544,10 +6544,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_uric_no_slash() {
var result0;
-
+
result0 = parse_unreserved();
if (result0 === null) {
result0 = parse_escaped();
@@ -6653,11 +6653,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_path_segments() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
pos0 = pos;
result0 = parse_segment();
if (result0 !== null) {
@@ -6721,11 +6721,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_segment() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
pos0 = pos;
result0 = [];
result1 = parse_pchar();
@@ -6794,10 +6794,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_param() {
var result0, result1;
-
+
result0 = [];
result1 = parse_pchar();
while (result1 !== null) {
@@ -6806,10 +6806,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_pchar() {
var result0;
-
+
result0 = parse_unreserved();
if (result0 === null) {
result0 = parse_escaped();
@@ -6893,11 +6893,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_scheme() {
var result0, result1, result2;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_ALPHA();
@@ -6992,28 +6992,28 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.scheme= input.substring(pos, offset); })(pos0);
+ data.scheme= input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_authority() {
var result0;
-
+
result0 = parse_srvr();
if (result0 === null) {
result0 = parse_reg_name();
}
return result0;
}
-
+
function parse_srvr() {
var result0, result1;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_userinfo();
@@ -7053,10 +7053,10 @@ JsSIP.grammar_sip = (function(){
result0 = result0 !== null ? result0 : "";
return result0;
}
-
+
function parse_reg_name() {
var result0, result1;
-
+
result1 = parse_unreserved();
if (result1 === null) {
result1 = parse_escaped();
@@ -7251,10 +7251,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_query() {
var result0, result1;
-
+
result0 = [];
result1 = parse_uric();
while (result1 !== null) {
@@ -7263,11 +7263,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SIP_Version() {
var result0, result1, result2, result3, result4, result5;
var pos0, pos1;
-
+
pos0 = pos;
pos1 = pos;
if (input.substr(pos, 3) === "SIP") {
@@ -7345,17 +7345,17 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.sip_version = input.substring(pos, offset); })(pos0);
+ data.sip_version = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_INVITEm() {
var result0;
-
+
if (input.substr(pos, 6) === "INVITE") {
result0 = "INVITE";
pos += 6;
@@ -7367,10 +7367,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_ACKm() {
var result0;
-
+
if (input.substr(pos, 3) === "ACK") {
result0 = "ACK";
pos += 3;
@@ -7382,10 +7382,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_OPTIONSm() {
var result0;
-
+
if (input.substr(pos, 7) === "OPTIONS") {
result0 = "OPTIONS";
pos += 7;
@@ -7397,10 +7397,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_BYEm() {
var result0;
-
+
if (input.substr(pos, 3) === "BYE") {
result0 = "BYE";
pos += 3;
@@ -7412,10 +7412,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_CANCELm() {
var result0;
-
+
if (input.substr(pos, 6) === "CANCEL") {
result0 = "CANCEL";
pos += 6;
@@ -7427,10 +7427,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_REGISTERm() {
var result0;
-
+
if (input.substr(pos, 8) === "REGISTER") {
result0 = "REGISTER";
pos += 8;
@@ -7442,10 +7442,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_SUBSCRIBEm() {
var result0;
-
+
if (input.substr(pos, 9) === "SUBSCRIBE") {
result0 = "SUBSCRIBE";
pos += 9;
@@ -7457,10 +7457,10 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_NOTIFYm() {
var result0;
-
+
if (input.substr(pos, 6) === "NOTIFY") {
result0 = "NOTIFY";
pos += 6;
@@ -7472,11 +7472,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_Method() {
var result0;
var pos0;
-
+
pos0 = pos;
result0 = parse_INVITEm();
if (result0 === null) {
@@ -7505,18 +7505,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.method = input.substring(pos, offset); })(pos0);
+ data.method = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_Status_Line() {
var result0, result1, result2, result3, result4;
var pos0;
-
+
pos0 = pos;
result0 = parse_SIP_Version();
if (result0 !== null) {
@@ -7551,27 +7551,27 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_Status_Code() {
var result0;
var pos0;
-
+
pos0 = pos;
result0 = parse_extension_code();
if (result0 !== null) {
result0 = (function(offset) {
- msg.status_code = input.substring(pos, offset); })(pos0);
+ data.status_code = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_extension_code() {
var result0, result1, result2;
var pos0;
-
+
pos0 = pos;
result0 = parse_DIGIT();
if (result0 !== null) {
@@ -7594,11 +7594,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_Reason_Phrase() {
var result0, result1;
var pos0;
-
+
pos0 = pos;
result0 = [];
result1 = parse_reserved();
@@ -7644,18 +7644,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg.reason_phrase = input.substring(pos, offset); })(pos0);
+ data.reason_phrase = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_Allow_Events() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
pos0 = pos;
result0 = parse_event_type();
if (result0 !== null) {
@@ -7703,11 +7703,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_Call_ID() {
var result0, result1, result2;
var pos0, pos1, pos2;
-
+
pos0 = pos;
pos1 = pos;
result0 = parse_word();
@@ -7747,18 +7747,18 @@ JsSIP.grammar_sip = (function(){
}
if (result0 !== null) {
result0 = (function(offset) {
- msg = input.substring(pos, offset); })(pos0);
+ data = input.substring(pos, offset); })(pos0);
}
if (result0 === null) {
pos = pos0;
}
return result0;
}
-
+
function parse_Contact() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
result0 = parse_STAR();
if (result0 === null) {
pos0 = pos;
@@ -7809,11 +7809,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-
+
function parse_contact_param() {
var result0, result1, result2, result3;
var pos0, pos1;
-
+
pos0 = pos;
result0 = parse_addr_spec();
if (result0 === null) {
@@ -7864,11 +7864,11 @@ JsSIP.grammar_sip = (function(){
}
return result0;
}
-