Skip to content
Permalink
Browse files

New method JsSIP.NameAddrHeader.parse() which returns a JsSIP.NameAdd…

…rHeader instance.
  • Loading branch information
ibc committed Feb 14, 2013
1 parent 7211bde commit 1ab6df38df92aa14f66eae2a20a894651f41c513
Showing with 19 additions and 0 deletions.
  1. +17 −0 src/NameAddrHeader.js
  2. +2 −0 src/URI.js
@@ -86,4 +86,21 @@ JsSIP.NameAddrHeader.prototype = {

return body;
}
};


/**
* Parse the given string and returns a JsSIP.NameAddrHeader instance or undefined if
* it is an invalid NameAddrHeader.
* @public
* @param {String} name_addr_header
*/
JsSIP.NameAddrHeader.parse = function(name_addr_header) {
name_addr_header = JsSIP.Grammar.parse(name_addr_header,'Name_Addr_Header');

if (name_addr_header !== -1) {
return name_addr_header;
} else {
return undefined;
}
};
@@ -52,6 +52,7 @@ JsSIP.URI = function(scheme, user, host, port, parameters, headers) {
host = value.toLowerCase();
}
},

port: {
get: function(){ return port; },
set: function(value){
@@ -163,6 +164,7 @@ JsSIP.URI.prototype = {

return uri;
},

toAor: function(show_port){
var aor;

0 comments on commit 1ab6df3

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