sip-call-ring
Version:
jssip freeswitch have ring call
1 lines • 653 kB
JavaScript
import"core-js/modules/es.array.concat.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.array.slice.js";import"core-js/modules/es.array.sort.js";import"core-js/modules/es.array.splice.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.number.constructor.js";import"core-js/modules/es.number.parse-int.js";import"core-js/modules/es.number.to-fixed.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/es.string.match.js";import"core-js/modules/es.string.replace.js";import"core-js/modules/es.string.search.js";import"core-js/modules/es.string.trim.js";import"core-js/modules/es.typed-array.uint32-array.js";import"core-js/modules/es.typed-array.copy-within.js";import"core-js/modules/es.typed-array.every.js";import"core-js/modules/es.typed-array.fill.js";import"core-js/modules/es.typed-array.filter.js";import"core-js/modules/es.typed-array.find.js";import"core-js/modules/es.typed-array.find-index.js";import"core-js/modules/es.typed-array.for-each.js";import"core-js/modules/es.typed-array.includes.js";import"core-js/modules/es.typed-array.index-of.js";import"core-js/modules/es.typed-array.iterator.js";import"core-js/modules/es.typed-array.join.js";import"core-js/modules/es.typed-array.last-index-of.js";import"core-js/modules/es.typed-array.map.js";import"core-js/modules/es.typed-array.reduce.js";import"core-js/modules/es.typed-array.reduce-right.js";import"core-js/modules/es.typed-array.reverse.js";import"core-js/modules/es.typed-array.set.js";import"core-js/modules/es.typed-array.slice.js";import"core-js/modules/es.typed-array.some.js";import"core-js/modules/es.typed-array.sort.js";import"core-js/modules/es.typed-array.subarray.js";import"core-js/modules/es.typed-array.to-locale-string.js";import"core-js/modules/es.typed-array.to-string.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/web.url.js";import"core-js/modules/web.url.to-json.js";import"core-js/modules/web.url-search-params.js";var e=function(){return e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},e.apply(this,arguments)};function t(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function n(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}"function"==typeof SuppressedError&&SuppressedError;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var s={name:"jssip",title:"JsSIP",description:"the Javascript SIP library",version:"3.10.1",homepage:"https://jssip.net",contributors:["José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)","Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)"],types:"lib/JsSIP.d.ts",main:"lib-es5/JsSIP.js",keywords:["sip","websocket","webrtc","node","browser","library"],license:"MIT",repository:{type:"git",url:"https://github.com/versatica/JsSIP.git"},bugs:{url:"https://github.com/versatica/JsSIP/issues"},dependencies:{"@types/events":"^3.0.0","@types/debug":"^4.1.7",debug:"^4.3.1",events:"^3.3.0","sdp-transform":"^2.14.1"},devDependencies:{"@babel/core":"^7.19.6","@babel/preset-env":"^7.19.4","ansi-colors":"^3.2.4",browserify:"^16.5.1",eslint:"^5.16.0","fancy-log":"^1.3.3",gulp:"^4.0.2","gulp-babel":"^8.0.0","gulp-eslint":"^5.0.0","gulp-expect-file":"^1.0.2","gulp-header":"^2.0.9","gulp-nodeunit-runner":"^0.2.2","gulp-plumber":"^1.2.1","gulp-rename":"^1.4.0","gulp-uglify-es":"^1.0.4",pegjs:"^0.7.0","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},scripts:{lint:"node npm-scripts.js lint",test:"node npm-scripts.js test",prepublish:"node npm-scripts.js prepublish",release:"node npm-scripts.js release"}},a=s,l={USER_AGENT:"".concat(a.title," ").concat(a.version),SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",DTMF_TRANSPORT:{INFO:"INFO",RFC2833:"RFC2833"},REASON_PHRASE:{100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",424:"Bad Location Information",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"JsSIP Internal Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60,CONNECTION_RECOVERY_MAX_INTERVAL:30,CONNECTION_RECOVERY_MIN_INTERVAL:2};function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V(e,t)}function d(e){var t=f();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function h(e){var t="function"==typeof Map?new Map:void 0;return h=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return p(e,arguments,g(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),V(r,e)},h(e)}function p(e,t,n){return p=f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&V(i,n.prototype),i},p.apply(null,arguments)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function V(e,t){return V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},V(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var A,_,v,y,w,S,b,C=function(){q(t,h(Error));var e=d(t);function t(n,r){var i;return c(this,t),(i=e.call(this)).code=1,i.name="CONFIGURATION_ERROR",i.parameter=n,i.value=r,i.message=i.value?"Invalid value ".concat(JSON.stringify(i.value),' for parameter "').concat(i.parameter,'"'):"Missing parameter: ".concat(i.parameter),i}return t}(),E=function(){q(t,h(Error));var e=d(t);function t(n){var r;return c(this,t),(r=e.call(this)).code=2,r.name="INVALID_STATE_ERROR",r.status=n,r.message="Invalid status: ".concat(n),r}return t}(),T=function(){q(t,h(Error));var e=d(t);function t(n){var r;return c(this,t),(r=e.call(this)).code=3,r.name="NOT_SUPPORTED_ERROR",r.message=n,r}return t}(),k=function(){q(t,h(Error));var e=d(t);function t(n){var r;return c(this,t),(r=e.call(this)).code=4,r.name="NOT_READY_ERROR",r.message=n,r}return t}(),I={ConfigurationError:C,InvalidStateError:E,NotSupportedError:T,NotReadyError:k},R={};function M(){if(_)return A;function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}_=1;var n=D(),r=O();return A=function(){function e(t,r,i){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof n))throw new TypeError('missing or invalid "uri" parameter');for(var o in this._uri=t,this._parameters={},this.display_name=r,i)Object.prototype.hasOwnProperty.call(i,o)&&this.setParam(o,i[o])}return t(e,null,[{key:"parse",value:function(e){return-1!==(e=r.parse(e,"Name_Addr_Header"))?e:void 0}}]),t(e,[{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"clone",value:function(){return new e(this._uri.clone(),this._display_name,JSON.parse(JSON.stringify(this._parameters)))}},{key:"_quote",value:function(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}},{key:"toString",value:function(){var e=this._display_name?'"'.concat(this._quote(this._display_name),'" '):"";for(var t in e+="<".concat(this._uri.toString(),">"),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,t)&&(e+=";".concat(t),null!==this._parameters[t]&&(e+="=".concat(this._parameters[t])));return e}},{key:"uri",get:function(){return this._uri}},{key:"display_name",get:function(){return this._display_name},set:function(e){this._display_name=0===e?"0":e}}]),e}(),A}function O(){return y||(y=1,v=function(){function e(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,n){var r={CRLF:l,DIGIT:u,ALPHA:c,HEXDIG:q,WSP:d,OCTET:h,DQUOTE:p,SP:f,HTAB:V,alphanum:g,reserved:m,unreserved:A,mark:_,escaped:v,LWS:y,SWS:w,HCOLON:S,TEXT_UTF8_TRIM:b,TEXT_UTF8char:C,UTF8_NONASCII:E,UTF8_CONT:T,LHEX:function(){var e;null===(e=u())&&(/^[a-f]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[a-f]")));return e},token:k,token_nodot:I,separators:function(){var e;40===t.charCodeAt(i)?(e="(",i++):(e=null,a('"("'));null===e&&(41===t.charCodeAt(i)?(e=")",i++):(e=null,a('")"')),null===e&&(60===t.charCodeAt(i)?(e="<",i++):(e=null,a('"<"')),null===e&&(62===t.charCodeAt(i)?(e=">",i++):(e=null,a('">"')),null===e&&(64===t.charCodeAt(i)?(e="@",i++):(e=null,a('"@"')),null===e&&(44===t.charCodeAt(i)?(e=",",i++):(e=null,a('","')),null===e&&(59===t.charCodeAt(i)?(e=";",i++):(e=null,a('";"')),null===e&&(58===t.charCodeAt(i)?(e=":",i++):(e=null,a('":"')),null===e&&(92===t.charCodeAt(i)?(e="\\",i++):(e=null,a('"\\\\"')),null===e&&null===(e=p())&&(47===t.charCodeAt(i)?(e="/",i++):(e=null,a('"/"')),null===e&&(91===t.charCodeAt(i)?(e="[",i++):(e=null,a('"["')),null===e&&(93===t.charCodeAt(i)?(e="]",i++):(e=null,a('"]"')),null===e&&(63===t.charCodeAt(i)?(e="?",i++):(e=null,a('"?"')),null===e&&(61===t.charCodeAt(i)?(e="=",i++):(e=null,a('"="')),null===e&&(123===t.charCodeAt(i)?(e="{",i++):(e=null,a('"{"')),null===e&&(125===t.charCodeAt(i)?(e="}",i++):(e=null,a('"}"')),null===e&&null===(e=f())&&(e=V()))))))))))))))));return e},word:R,STAR:O,SLASH:N,EQUAL:x,LPAREN:U,RPAREN:B,RAQUOT:L,LAQUOT:j,COMMA:P,SEMI:F,COLON:Q,LDQUOT:G,RDQUOT:Y,comment:function e(){var t,n,r,o;if(o=i,null!==(t=U())){for(n=[],null===(r=K())&&null===(r=Z())&&(r=e());null!==r;)n.push(r),null===(r=K())&&null===(r=Z())&&(r=e());null!==n&&null!==(r=B())?t=[t,n,r]:(t=null,i=o)}else t=null,i=o;return t},ctext:K,quoted_string:H,quoted_string_clean:J,qdtext:W,quoted_pair:Z,SIP_URI_noparams:z,SIP_URI:X,uri_scheme:$,uri_scheme_sips:ee,uri_scheme_sip:te,userinfo:ne,user:re,user_unreserved:ie,password:oe,hostport:se,host:ae,hostname:le,domainlabel:ue,toplabel:ce,IPv6reference:qe,IPv6address:de,h16:he,ls32:pe,IPv4address:fe,dec_octet:Ve,port:ge,uri_parameters:me,uri_parameter:Ae,transport_param:_e,user_param:ve,method_param:ye,ttl_param:we,maddr_param:Se,lr_param:be,other_param:Ce,pname:Ee,pvalue:Te,paramchar:ke,param_unreserved:Ie,headers:Re,header:Me,hname:Oe,hvalue:De,hnv_unreserved:Ne,Request_Response:function(){var e;null===(e=qt())&&(e=xe());return e},Request_Line:xe,Request_URI:Ue,absoluteURI:Be,hier_part:Le,net_path:je,abs_path:Pe,opaque_part:Fe,uric:Qe,uric_no_slash:Ge,path_segments:Ye,segment:Ke,param:He,pchar:Je,scheme:We,authority:Ze,srvr:ze,reg_name:Xe,query:$e,SIP_Version:et,INVITEm:tt,ACKm:nt,OPTIONSm:rt,BYEm:it,CANCELm:ot,REGISTERm:st,SUBSCRIBEm:at,NOTIFYm:lt,REFERm:ut,Method:ct,Status_Line:qt,Status_Code:dt,extension_code:ht,Reason_Phrase:pt,Allow_Events:function(){var e,t,n,r,o,s;if(o=i,null!==(e=Bt())){for(t=[],s=i,null!==(n=P())&&null!==(r=Bt())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=Bt())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},Call_ID:function(){var e,n,r,o,s,l;o=i,s=i,null!==(e=R())?(l=i,64===t.charCodeAt(i)?(n="@",i++):(n=null,a('"@"')),null!==n&&null!==(r=R())?n=[n,r]:(n=null,i=l),null!==(n=null!==n?n:"")?e=[e,n]:(e=null,i=s)):(e=null,i=s);null!==e&&(e=function(e){Pn=t.substring(i,e)}(o));null===e&&(i=o);return e},Contact:function(){var e,t,n,r,o,s,a;if(o=i,null===(e=O()))if(s=i,null!==(e=ft())){for(t=[],a=i,null!==(n=P())&&null!==(r=ft())?n=[n,r]:(n=null,i=a);null!==n;)t.push(n),a=i,null!==(n=P())&&null!==(r=ft())?n=[n,r]:(n=null,i=a);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;null!==e&&(e=function(){var e,t;for(t=Pn.multi_header.length,e=0;e<t;e++)if(null===Pn.multi_header[e].parsed){Pn=null;break}Pn=null!==Pn?Pn.multi_header:-1}());null===e&&(i=o);return e},contact_param:ft,name_addr:Vt,display_name:gt,contact_params:mt,c_p_q:At,c_p_expires:_t,delta_seconds:vt,qvalue:yt,generic_param:wt,gen_value:St,Content_Disposition:function(){var e,t,n,r,o,s;if(o=i,null!==(e=bt())){for(t=[],s=i,null!==(n=F())&&null!==(r=Ct())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=F())&&null!==(r=Ct())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},disp_type:bt,disp_param:Ct,handling_param:Et,Content_Encoding:function(){var e,t,n,r,o,s;if(o=i,null!==(e=k())){for(t=[],s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},Content_Length:function(){var e,t,n;if(n=i,null!==(t=u()))for(e=[];null!==t;)e.push(t),t=u();else e=null;null!==e&&(e=void(Pn=parseInt(e.join(""))));null===e&&(i=n);return e},Content_Type:function(){var e,n;n=i,null!==(e=Tt())&&(e=function(e){Pn=t.substring(i,e)}(n));null===e&&(i=n);return e},media_type:Tt,m_type:kt,discrete_type:It,composite_type:Rt,extension_token:Mt,x_token:Ot,m_subtype:Dt,m_parameter:Nt,m_value:xt,CSeq:function(){var e,t,n,r;r=i,null!==(e=Ut())&&null!==(t=y())&&null!==(n=ct())?e=[e,t,n]:(e=null,i=r);return e},CSeq_value:Ut,Expires:function(){var e,t;t=i,null!==(e=vt())&&(e=void(Pn=e));null===e&&(i=t);return e},Event:function(){var e,t,n,r,o,s,a;if(o=i,s=i,null!==(e=Bt())){for(t=[],a=i,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,i=a);null!==n;)t.push(n),a=i,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,i=a);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;null!==e&&(l=e[0],e=void(Pn.event=l.join("").toLowerCase()));var l;null===e&&(i=o);return e},event_type:Bt,From:function(){var e,t,n,r,o,s,a;o=i,s=i,null===(e=z())&&(e=Vt());if(null!==e){for(t=[],a=i,null!==(n=F())&&null!==(r=Lt())?n=[n,r]:(n=null,i=a);null!==n;)t.push(n),a=i,null!==(n=F())&&null!==(r=Lt())?n=[n,r]:(n=null,i=a);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;null!==e&&(e=function(){var e=Pn.tag;try{Pn=new jn(Pn.uri,Pn.display_name,Pn.params),e&&Pn.setParam("tag",e)}catch(e){Pn=-1}}());null===e&&(i=o);return e},from_param:Lt,tag_param:jt,Max_Forwards:function(){var e,t,n;if(n=i,null!==(t=u()))for(e=[];null!==t;)e.push(t),t=u();else e=null;null!==e&&(e=void(Pn=parseInt(e.join(""))));null===e&&(i=n);return e},Min_Expires:function(){var e,t;t=i,null!==(e=vt())&&(e=void(Pn=e));null===e&&(i=t);return e},Name_Addr_Header:function(){var e,t,n,r,o,s,a,l,u,c;l=i,u=i,e=[],t=gt();for(;null!==t;)e.push(t),t=gt();if(null!==e)if(null!==(t=j()))if(null!==(n=X()))if(null!==(r=L())){for(o=[],c=i,null!==(s=F())&&null!==(a=wt())?s=[s,a]:(s=null,i=c);null!==s;)o.push(s),c=i,null!==(s=F())&&null!==(a=wt())?s=[s,a]:(s=null,i=c);null!==o?e=[e,t,n,r,o]:(e=null,i=u)}else e=null,i=u;else e=null,i=u;else e=null,i=u;else e=null,i=u;null!==e&&(e=function(){try{Pn=new jn(Pn.uri,Pn.display_name,Pn.params)}catch(e){Pn=-1}}());null===e&&(i=l);return e},Proxy_Authenticate:function(){return Pt()},challenge:Pt,other_challenge:Ft,auth_param:Qt,digest_cln:Gt,realm:Yt,realm_value:Kt,domain:Ht,URI:Jt,nonce:Wt,nonce_value:Zt,opaque:zt,stale:Xt,algorithm:$t,qop_options:en,qop_value:tn,Proxy_Require:function(){var e,t,n,r,o,s;if(o=i,null!==(e=k())){for(t=[],s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},Record_Route:function(){var e,t,n,r,o,s,a;if(o=i,s=i,null!==(e=nn())){for(t=[],a=i,null!==(n=P())&&null!==(r=nn())?n=[n,r]:(n=null,i=a);null!==n;)t.push(n),a=i,null!==(n=P())&&null!==(r=nn())?n=[n,r]:(n=null,i=a);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;null!==e&&(e=function(){var e,t;for(t=Pn.multi_header.length,e=0;e<t;e++)if(null===Pn.multi_header[e].parsed){Pn=null;break}Pn=null!==Pn?Pn.multi_header:-1}());null===e&&(i=o);return e},rec_route:nn,Reason:function(){var e,n,r,o,s,l,u;s=i,l=i,"sip"===t.substr(i,3).toLowerCase()?(e=t.substr(i,3),i+=3):(e=null,a('"SIP"'));null===e&&(e=k());if(null!==e){for(n=[],u=i,null!==(r=F())&&null!==(o=rn())?r=[r,o]:(r=null,i=u);null!==r;)n.push(r),u=i,null!==(r=F())&&null!==(o=rn())?r=[r,o]:(r=null,i=u);null!==n?e=[e,n]:(e=null,i=l)}else e=null,i=l;null!==e&&(e=function(e,t){if(Pn.protocol=t.toLowerCase(),Pn.params||(Pn.params={}),Pn.params.text&&'"'===Pn.params.text[0]){var n=Pn.params.text;Pn.text=n.substring(1,n.length-1),delete Pn.params.text}}(0,e[0]));null===e&&(i=s);return e},reason_param:rn,reason_cause:on,Require:function(){var e,t,n,r,o,s;if(o=i,null!==(e=k())){for(t=[],s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},Route:function(){var e,t,n,r,o,s;if(o=i,null!==(e=sn())){for(t=[],s=i,null!==(n=P())&&null!==(r=sn())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=sn())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},route_param:sn,Subscription_State:function(){var e,t,n,r,o,s;if(o=i,null!==(e=an())){for(t=[],s=i,null!==(n=F())&&null!==(r=ln())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=F())&&null!==(r=ln())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},substate_value:an,subexp_params:ln,event_reason_value:un,Subject:function(){var e;return e=null!==(e=b())?e:""},Supported:function(){var e,t,n,r,o,s;if(o=i,null!==(e=k())){for(t=[],s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=k())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e=null!==e?e:""},To:function(){var e,t,n,r,o,s,a;o=i,s=i,null===(e=z())&&(e=Vt());if(null!==e){for(t=[],a=i,null!==(n=F())&&null!==(r=cn())?n=[n,r]:(n=null,i=a);null!==n;)t.push(n),a=i,null!==(n=F())&&null!==(r=cn())?n=[n,r]:(n=null,i=a);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;null!==e&&(e=function(){var e=Pn.tag;try{Pn=new jn(Pn.uri,Pn.display_name,Pn.params),e&&Pn.setParam("tag",e)}catch(e){Pn=-1}}());null===e&&(i=o);return e},to_param:cn,Via:function(){var e,t,n,r,o,s;if(o=i,null!==(e=qn())){for(t=[],s=i,null!==(n=P())&&null!==(r=qn())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=P())&&null!==(r=qn())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},via_param:qn,via_params:dn,via_ttl:hn,via_maddr:pn,via_received:fn,via_branch:Vn,response_port:gn,rport:mn,sent_protocol:An,protocol_name:_n,transport:vn,sent_by:yn,via_host:wn,via_port:Sn,ttl:bn,WWW_Authenticate:function(){return Pt()},Session_Expires:function(){var e,t,n,r,o,s;if(o=i,null!==(e=Cn())){for(t=[],s=i,null!==(n=F())&&null!==(r=En())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=F())&&null!==(r=En())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},s_e_expires:Cn,s_e_params:En,s_e_refresher:Tn,extension_header:function(){var e,t,n,r;r=i,null!==(e=k())&&null!==(t=S())&&null!==(n=kn())?e=[e,t,n]:(e=null,i=r);return e},header_value:kn,message_body:function(){var e,t;e=[],t=h();for(;null!==t;)e.push(t),t=h();return e},uuid_URI:function(){var e,n,r;r=i,"uuid:"===t.substr(i,5)?(e="uuid:",i+=5):(e=null,a('"uuid:"'));null!==e&&null!==(n=In())?e=[e,n]:(e=null,i=r);return e},uuid:In,hex4:Rn,hex8:Mn,hex12:On,Refer_To:function(){var e,t,n,r,o,s,a;o=i,s=i,null===(e=z())&&(e=Vt());if(null!==e){for(t=[],a=i,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,i=a);null!==n;)t.push(n),a=i,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,i=a);null!==t?e=[e,t]:(e=null,i=s)}else e=null,i=s;null!==e&&(e=function(){try{Pn=new jn(Pn.uri,Pn.display_name,Pn.params)}catch(e){Pn=-1}}());null===e&&(i=o);return e},Replaces:function(){var e,t,n,r,o,s;if(o=i,null!==(e=Dn())){for(t=[],s=i,null!==(n=F())&&null!==(r=Nn())?n=[n,r]:(n=null,i=s);null!==n;)t.push(n),s=i,null!==(n=F())&&null!==(r=Nn())?n=[n,r]:(n=null,i=s);null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return e},call_id:Dn,replaces_param:Nn,to_tag:xn,from_tag:Un,early_flag:Bn};if(void 0!==n){if(void 0===r[n])throw new Error("Invalid rule name: "+e(n)+".")}else n="CRLF";var i=0,o=0,s=[];function a(e){i<o||(i>o&&(o=i,s=[]),s.push(e))}function l(){var e;return"\r\n"===t.substr(i,2)?(e="\r\n",i+=2):(e=null,a('"\\r\\n"')),e}function u(){var e;return/^[0-9]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[0-9]")),e}function c(){var e;return/^[a-zA-Z]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[a-zA-Z]")),e}function q(){var e;return/^[0-9a-fA-F]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[0-9a-fA-F]")),e}function d(){var e;return null===(e=f())&&(e=V()),e}function h(){var e;return/^[\0-\xFF]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[\\0-\\xFF]")),e}function p(){var e;return/^["]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a('["]')),e}function f(){var e;return 32===t.charCodeAt(i)?(e=" ",i++):(e=null,a('" "')),e}function V(){var e;return 9===t.charCodeAt(i)?(e="\t",i++):(e=null,a('"\\t"')),e}function g(){var e;return/^[a-zA-Z0-9]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[a-zA-Z0-9]")),e}function m(){var e;return 59===t.charCodeAt(i)?(e=";",i++):(e=null,a('";"')),null===e&&(47===t.charCodeAt(i)?(e="/",i++):(e=null,a('"/"')),null===e&&(63===t.charCodeAt(i)?(e="?",i++):(e=null,a('"?"')),null===e&&(58===t.charCodeAt(i)?(e=":",i++):(e=null,a('":"')),null===e&&(64===t.charCodeAt(i)?(e="@",i++):(e=null,a('"@"')),null===e&&(38===t.charCodeAt(i)?(e="&",i++):(e=null,a('"&"')),null===e&&(61===t.charCodeAt(i)?(e="=",i++):(e=null,a('"="')),null===e&&(43===t.charCodeAt(i)?(e="+",i++):(e=null,a('"+"')),null===e&&(36===t.charCodeAt(i)?(e="$",i++):(e=null,a('"$"')),null===e&&(44===t.charCodeAt(i)?(e=",",i++):(e=null,a('","'))))))))))),e}function A(){var e;return null===(e=g())&&(e=_()),e}function _(){var e;return 45===t.charCodeAt(i)?(e="-",i++):(e=null,a('"-"')),null===e&&(95===t.charCodeAt(i)?(e="_",i++):(e=null,a('"_"')),null===e&&(46===t.charCodeAt(i)?(e=".",i++):(e=null,a('"."')),null===e&&(33===t.charCodeAt(i)?(e="!",i++):(e=null,a('"!"')),null===e&&(126===t.charCodeAt(i)?(e="~",i++):(e=null,a('"~"')),null===e&&(42===t.charCodeAt(i)?(e="*",i++):(e=null,a('"*"')),null===e&&(39===t.charCodeAt(i)?(e="'",i++):(e=null,a('"\'"')),null===e&&(40===t.charCodeAt(i)?(e="(",i++):(e=null,a('"("')),null===e&&(41===t.charCodeAt(i)?(e=")",i++):(e=null,a('")"')))))))))),e}function v(){var e,n,r,o,s;return o=i,s=i,37===t.charCodeAt(i)?(e="%",i++):(e=null,a('"%"')),null!==e&&null!==(n=q())&&null!==(r=q())?e=[e,n,r]:(e=null,i=s),null!==e&&(e=e.join("")),null===e&&(i=o),e}function y(){var e,t,n,r,o,s;for(r=i,o=i,s=i,e=[],t=d();null!==t;)e.push(t),t=d();if(null!==e&&null!==(t=l())?e=[e,t]:(e=null,i=s),null!==(e=null!==e?e:"")){if(null!==(n=d()))for(t=[];null!==n;)t.push(n),n=d();else t=null;null!==t?e=[e,t]:(e=null,i=o)}else e=null,i=o;return null!==e&&(e=" "),null===e&&(i=r),e}function w(){var e;return e=null!==(e=y())?e:""}function S(){var e,n,r,o,s;for(o=i,s=i,e=[],null===(n=f())&&(n=V());null!==n;)e.push(n),null===(n=f())&&(n=V());return null!==e?(58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=":"),null===e&&(i=o),e}function b(){var e,n,r,o,s,a,l;if(s=i,a=i,null!==(n=C()))for(e=[];null!==n;)e.push(n),n=C();else e=null;if(null!==e){for(n=[],l=i,r=[],o=y();null!==o;)r.push(o),o=y();for(null!==r&&null!==(o=C())?r=[r,o]:(r=null,i=l);null!==r;){for(n.push(r),l=i,r=[],o=y();null!==o;)r.push(o),o=y();null!==r&&null!==(o=C())?r=[r,o]:(r=null,i=l)}null!==n?e=[e,n]:(e=null,i=a)}else e=null,i=a;return null!==e&&(e=function(e){return t.substring(i,e)}(s)),null===e&&(i=s),e}function C(){var e;return/^[!-~]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[!-~]")),null===e&&(e=E()),e}function E(){var e;return/^[\x80-\uFFFF]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[\\x80-\\uFFFF]")),e}function T(){var e;return/^[\x80-\xBF]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[\\x80-\\xBF]")),e}function k(){var e,n,r;if(r=i,null===(n=g())&&(45===t.charCodeAt(i)?(n="-",i++):(n=null,a('"-"')),null===n&&(46===t.charCodeAt(i)?(n=".",i++):(n=null,a('"."')),null===n&&(33===t.charCodeAt(i)?(n="!",i++):(n=null,a('"!"')),null===n&&(37===t.charCodeAt(i)?(n="%",i++):(n=null,a('"%"')),null===n&&(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null===n&&(95===t.charCodeAt(i)?(n="_",i++):(n=null,a('"_"')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(96===t.charCodeAt(i)?(n="`",i++):(n=null,a('"`"')),null===n&&(39===t.charCodeAt(i)?(n="'",i++):(n=null,a('"\'"')),null===n&&(126===t.charCodeAt(i)?(n="~",i++):(n=null,a('"~"')))))))))))),null!==n)for(e=[];null!==n;)e.push(n),null===(n=g())&&(45===t.charCodeAt(i)?(n="-",i++):(n=null,a('"-"')),null===n&&(46===t.charCodeAt(i)?(n=".",i++):(n=null,a('"."')),null===n&&(33===t.charCodeAt(i)?(n="!",i++):(n=null,a('"!"')),null===n&&(37===t.charCodeAt(i)?(n="%",i++):(n=null,a('"%"')),null===n&&(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null===n&&(95===t.charCodeAt(i)?(n="_",i++):(n=null,a('"_"')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(96===t.charCodeAt(i)?(n="`",i++):(n=null,a('"`"')),null===n&&(39===t.charCodeAt(i)?(n="'",i++):(n=null,a('"\'"')),null===n&&(126===t.charCodeAt(i)?(n="~",i++):(n=null,a('"~"'))))))))))));else e=null;return null!==e&&(e=function(e){return t.substring(i,e)}(r)),null===e&&(i=r),e}function I(){var e,n,r;if(r=i,null===(n=g())&&(45===t.charCodeAt(i)?(n="-",i++):(n=null,a('"-"')),null===n&&(33===t.charCodeAt(i)?(n="!",i++):(n=null,a('"!"')),null===n&&(37===t.charCodeAt(i)?(n="%",i++):(n=null,a('"%"')),null===n&&(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null===n&&(95===t.charCodeAt(i)?(n="_",i++):(n=null,a('"_"')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(96===t.charCodeAt(i)?(n="`",i++):(n=null,a('"`"')),null===n&&(39===t.charCodeAt(i)?(n="'",i++):(n=null,a('"\'"')),null===n&&(126===t.charCodeAt(i)?(n="~",i++):(n=null,a('"~"'))))))))))),null!==n)for(e=[];null!==n;)e.push(n),null===(n=g())&&(45===t.charCodeAt(i)?(n="-",i++):(n=null,a('"-"')),null===n&&(33===t.charCodeAt(i)?(n="!",i++):(n=null,a('"!"')),null===n&&(37===t.charCodeAt(i)?(n="%",i++):(n=null,a('"%"')),null===n&&(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null===n&&(95===t.charCodeAt(i)?(n="_",i++):(n=null,a('"_"')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(96===t.charCodeAt(i)?(n="`",i++):(n=null,a('"`"')),null===n&&(39===t.charCodeAt(i)?(n="'",i++):(n=null,a('"\'"')),null===n&&(126===t.charCodeAt(i)?(n="~",i++):(n=null,a('"~"')))))))))));else e=null;return null!==e&&(e=function(e){return t.substring(i,e)}(r)),null===e&&(i=r),e}function R(){var e,n,r;if(r=i,null===(n=g())&&(45===t.charCodeAt(i)?(n="-",i++):(n=null,a('"-"')),null===n&&(46===t.charCodeAt(i)?(n=".",i++):(n=null,a('"."')),null===n&&(33===t.charCodeAt(i)?(n="!",i++):(n=null,a('"!"')),null===n&&(37===t.charCodeAt(i)?(n="%",i++):(n=null,a('"%"')),null===n&&(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null===n&&(95===t.charCodeAt(i)?(n="_",i++):(n=null,a('"_"')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(96===t.charCodeAt(i)?(n="`",i++):(n=null,a('"`"')),null===n&&(39===t.charCodeAt(i)?(n="'",i++):(n=null,a('"\'"')),null===n&&(126===t.charCodeAt(i)?(n="~",i++):(n=null,a('"~"')),null===n&&(40===t.charCodeAt(i)?(n="(",i++):(n=null,a('"("')),null===n&&(41===t.charCodeAt(i)?(n=")",i++):(n=null,a('")"')),null===n&&(60===t.charCodeAt(i)?(n="<",i++):(n=null,a('"<"')),null===n&&(62===t.charCodeAt(i)?(n=">",i++):(n=null,a('">"')),null===n&&(58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null===n&&(92===t.charCodeAt(i)?(n="\\",i++):(n=null,a('"\\\\"')),null===n&&null===(n=p())&&(47===t.charCodeAt(i)?(n="/",i++):(n=null,a('"/"')),null===n&&(91===t.charCodeAt(i)?(n="[",i++):(n=null,a('"["')),null===n&&(93===t.charCodeAt(i)?(n="]",i++):(n=null,a('"]"')),null===n&&(63===t.charCodeAt(i)?(n="?",i++):(n=null,a('"?"')),null===n&&(123===t.charCodeAt(i)?(n="{",i++):(n=null,a('"{"')),null===n&&(125===t.charCodeAt(i)?(n="}",i++):(n=null,a('"}"')))))))))))))))))))))))),null!==n)for(e=[];null!==n;)e.push(n),null===(n=g())&&(45===t.charCodeAt(i)?(n="-",i++):(n=null,a('"-"')),null===n&&(46===t.charCodeAt(i)?(n=".",i++):(n=null,a('"."')),null===n&&(33===t.charCodeAt(i)?(n="!",i++):(n=null,a('"!"')),null===n&&(37===t.charCodeAt(i)?(n="%",i++):(n=null,a('"%"')),null===n&&(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null===n&&(95===t.charCodeAt(i)?(n="_",i++):(n=null,a('"_"')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(96===t.charCodeAt(i)?(n="`",i++):(n=null,a('"`"')),null===n&&(39===t.charCodeAt(i)?(n="'",i++):(n=null,a('"\'"')),null===n&&(126===t.charCodeAt(i)?(n="~",i++):(n=null,a('"~"')),null===n&&(40===t.charCodeAt(i)?(n="(",i++):(n=null,a('"("')),null===n&&(41===t.charCodeAt(i)?(n=")",i++):(n=null,a('")"')),null===n&&(60===t.charCodeAt(i)?(n="<",i++):(n=null,a('"<"')),null===n&&(62===t.charCodeAt(i)?(n=">",i++):(n=null,a('">"')),null===n&&(58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null===n&&(92===t.charCodeAt(i)?(n="\\",i++):(n=null,a('"\\\\"')),null===n&&null===(n=p())&&(47===t.charCodeAt(i)?(n="/",i++):(n=null,a('"/"')),null===n&&(91===t.charCodeAt(i)?(n="[",i++):(n=null,a('"["')),null===n&&(93===t.charCodeAt(i)?(n="]",i++):(n=null,a('"]"')),null===n&&(63===t.charCodeAt(i)?(n="?",i++):(n=null,a('"?"')),null===n&&(123===t.charCodeAt(i)?(n="{",i++):(n=null,a('"{"')),null===n&&(125===t.charCodeAt(i)?(n="}",i++):(n=null,a('"}"'))))))))))))))))))))))));else e=null;return null!==e&&(e=function(e){return t.substring(i,e)}(r)),null===e&&(i=r),e}function O(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(42===t.charCodeAt(i)?(n="*",i++):(n=null,a('"*"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e="*"),null===e&&(i=o),e}function N(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(47===t.charCodeAt(i)?(n="/",i++):(n=null,a('"/"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e="/"),null===e&&(i=o),e}function x(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(61===t.charCodeAt(i)?(n="=",i++):(n=null,a('"="')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e="="),null===e&&(i=o),e}function U(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(40===t.charCodeAt(i)?(n="(",i++):(n=null,a('"("')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e="("),null===e&&(i=o),e}function B(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(41===t.charCodeAt(i)?(n=")",i++):(n=null,a('")"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=")"),null===e&&(i=o),e}function L(){var e,n,r,o;return r=i,o=i,62===t.charCodeAt(i)?(e=">",i++):(e=null,a('">"')),null!==e&&null!==(n=w())?e=[e,n]:(e=null,i=o),null!==e&&(e=">"),null===e&&(i=r),e}function j(){var e,n,r,o;return r=i,o=i,null!==(e=w())?(60===t.charCodeAt(i)?(n="<",i++):(n=null,a('"<"')),null!==n?e=[e,n]:(e=null,i=o)):(e=null,i=o),null!==e&&(e="<"),null===e&&(i=r),e}function P(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(44===t.charCodeAt(i)?(n=",",i++):(n=null,a('","')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=","),null===e&&(i=o),e}function F(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(59===t.charCodeAt(i)?(n=";",i++):(n=null,a('";"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=";"),null===e&&(i=o),e}function Q(){var e,n,r,o,s;return o=i,s=i,null!==(e=w())?(58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=":"),null===e&&(i=o),e}function G(){var e,t,n,r;return n=i,r=i,null!==(e=w())&&null!==(t=p())?e=[e,t]:(e=null,i=r),null!==e&&(e='"'),null===e&&(i=n),e}function Y(){var e,t,n,r;return n=i,r=i,null!==(e=p())&&null!==(t=w())?e=[e,t]:(e=null,i=r),null!==e&&(e='"'),null===e&&(i=n),e}function K(){var e;return/^[!-']/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[!-']")),null===e&&(/^[*-[]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[*-[]")),null===e&&(/^[\]-~]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[\\]-~]")),null===e&&null===(e=E())&&(e=y()))),e}function H(){var e,n,r,o,s,a;if(s=i,a=i,null!==(e=w()))if(null!==(n=p())){for(r=[],null===(o=W())&&(o=Z());null!==o;)r.push(o),null===(o=W())&&(o=Z());null!==r&&null!==(o=p())?e=[e,n,r,o]:(e=null,i=a)}else e=null,i=a;else e=null,i=a;return null!==e&&(e=function(e){return t.substring(i,e)}(s)),null===e&&(i=s),e}function J(){var e,n,r,o,s,a;if(s=i,a=i,null!==(e=w()))if(null!==(n=p())){for(r=[],null===(o=W())&&(o=Z());null!==o;)r.push(o),null===(o=W())&&(o=Z());null!==r&&null!==(o=p())?e=[e,n,r,o]:(e=null,i=a)}else e=null,i=a;else e=null,i=a;return null!==e&&(e=function(e){var n=t.substring(i,e).trim();return n.substring(1,n.length-1).replace(/\\([\x00-\x09\x0b-\x0c\x0e-\x7f])/g,"$1")}(s)),null===e&&(i=s),e}function W(){var e;return null===(e=y())&&(33===t.charCodeAt(i)?(e="!",i++):(e=null,a('"!"')),null===e&&(/^[#-[]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[#-[]")),null===e&&(/^[\]-~]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,a("[\\]-~]")),null===e&&(e=E())))),e}function Z(){var e,n,r;return r=i,92===t.charCodeAt(i)?(e="\\",i++):(e=null,a('"\\\\"')),null!==e?(/^[\0-\t]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,a("[\\0-\\t]")),null===n&&(/^[\x0B-\f]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,a("[\\x0B-\\f]")),null===n&&(/^[\x0E-]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,a("[\\x0E-]")))),null!==n?e=[e,n]:(e=null,i=r)):(e=null,i=r),e}function z(){var e,n,r,o,s,l;return s=i,l=i,null!==(e=$())?(58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=null!==(r=ne())?r:"")&&null!==(o=se())?e=[e,n,r,o]:(e=null,i=l)):(e=null,i=l),null!==e&&(e=function(){try{Pn.uri=new Ln(Pn.scheme,Pn.user,Pn.host,Pn.port),delete Pn.scheme,delete Pn.user,delete Pn.host,delete Pn.host_type,delete Pn.port}catch(e){Pn=-1}}()),null===e&&(i=s),e}function X(){var e,r,o,s,l,u,c,q;return c=i,q=i,null!==(e=$())?(58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=null!==(o=ne())?o:"")&&null!==(s=se())&&null!==(l=me())&&null!==(u=null!==(u=Re())?u:"")?e=[e,r,o,s,l,u]:(e=null,i=q)):(e=null,i=q),null!==e&&(e=function(){try{Pn.uri=new Ln(Pn.scheme,Pn.user,Pn.host,Pn.port,Pn.uri_params,Pn.uri_headers),delete Pn.scheme,delete Pn.user,delete Pn.host,delete Pn.host_type,delete Pn.port,delete Pn.uri_params,"SIP_URI"===n&&(Pn=Pn.uri)}catch(e){Pn=-1}}()),null===e&&(i=c),e}function $(){var e;return null===(e=ee())&&(e=te()),e}function ee(){var e,n,r;return n=i,"sips"===t.substr(i,4).toLowerCase()?(e=t.substr(i,4),i+=4):(e=null,a('"sips"')),null!==e&&(r=e,e=void(Pn.scheme=r.toLowerCase())),null===e&&(i=n),e}function te(){var e,n,r;return n=i,"sip"===t.substr(i,3).toLowerCase()?(e=t.substr(i,3),i+=3):(e=null,a('"sip"')),null!==e&&(r=e,e=void(Pn.scheme=r.toLowerCase())),null===e&&(i=n),e}function ne(){var e,n,r,o,s,l;return o=i,s=i,null!==(e=re())?(l=i,58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=oe())?n=[n,r]:(n=null,i=l),null!==(n=null!==n?n:"")?(64===t.charCodeAt(i)?(r="@",i++):(r=null,a('"@"')),null!==r?e=[e,n,r]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),null!==e&&(e=function(e){Pn.user=decodeURIComponent(t.substring(i-1,e))}(o)),null===e&&(i=o),e}function re(){var e,t;if(null===(t=A())&&null===(t=v())&&(t=ie()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=A())&&null===(t=v())&&(t=ie());else e=null;return e}function ie(){var e;return 38===t.charCodeAt(i)?(e="&",i++):(e=null,a('"&"')),null===e&&(61===t.charCodeAt(i)?(e="=",i++):(e=null,a('"="')),null===e&&(43===t.charCodeAt(i)?(e="+",i++):(e=null,a('"+"')),null===e&&(36===t.charCodeAt(i)?(e="$",i++):(e=null,a('"$"')),null===e&&(44===t.charCodeAt(i)?(e=",",i++):(e=null,a('","')),null===e&&(59===t.charCodeAt(i)?(e=";",i++):(e=null,a('";"')),null===e&&(63===t.charCodeAt(i)?(e="?",i++):(e=null,a('"?"')),null===e&&(47===t.charCodeAt(i)?(e="/",i++):(e=null,a('"/"'))))))))),e}function oe(){var e,n,r;for(r=i,e=[],null===(n=A())&&null===(n=v())&&(38===t.charCodeAt(i)?(n="&",i++):(n=null,a('"&"')),null===n&&(61===t.charCodeAt(i)?(n="=",i++):(n=null,a('"="')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(36===t.charCodeAt(i)?(n="$",i++):(n=null,a('"$"')),null===n&&(44===t.charCodeAt(i)?(n=",",i++):(n=null,a('","')))))));null!==n;)e.push(n),null===(n=A())&&null===(n=v())&&(38===t.charCodeAt(i)?(n="&",i++):(n=null,a('"&"')),null===n&&(61===t.charCodeAt(i)?(n="=",i++):(n=null,a('"="')),null===n&&(43===t.charCodeAt(i)?(n="+",i++):(n=null,a('"+"')),null===n&&(36===t.charCodeAt(i)?(n="$",i++):(n=null,a('"$"')),null===n&&(44===t.charCodeAt(i)?(n=",",i++):(n=null,a('","')))))));return null!==e&&(e=function(e){Pn.password=t.substring(i,e)}(r)),null===e&&(i=r),e}function se(){var e,n,r,o,s;return o=i,null!==(e=ae())?(s=i,58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=ge())?n=[n,r]:(n=null,i=s),null!==(n=null!==n?n:"")?e=[e,n]:(e=null,i=o)):(e=null,i=o),e}function ae(){var e,n;return n=i,null===(e=le())&&null===(e=fe())&&(e=qe()),null!==e&&(e=function(e){return Pn.host=t.substring(i,e).toLowerCase(),Pn.host}(n)),null===e&&(i=n),e}function le(){var e,n,r,o,s,l;for(o=i,s=i,e=[],l=i,null!==(n=ue())?(46===t.charCodeAt(i)?(r=".",i++):(r=null,a('"."')),null!==r?n=[n,r]:(n=null,i=l)):(n=null,i=l);null!==n;)e.push(n),l=i,null!==(n=ue())?(46===t.charCodeAt(i)?(r=".",i++):(r=null,a('"."')),null!==r?n=[n,r]:(n=null,i=l)):(n=null,i=l);return null!==e&&null!==(n=ce())?(46===t.charCodeAt(i)?(r=".",i++):(r=null,a('"."')),null!==(r=null!==r?r:"")?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=function(e){return Pn.host_type="domain",t.substring(i,e)}(o)),null===e&&(i=o),e}function ue(){var e,n,r,o;if(o=i,null!==(e=g())){for(n=[],null===(r=g())&&(45===t.charCodeAt(i)?(r="-",i++):(r=null,a('"-"')),null===r&&(95===t.charCodeAt(i)?(r="_",i++):(r=null,a('"_"'))));null!==r;)n.push(r),null===(r=g())&&(45===t.charCodeAt(i)?(r="-",i++):(r=null,a('"-"')),null===r&&(95===t.charCodeAt(i)?(r="_",i++):(r=null,a('"_"'))));null!==n?e=[e,n]:(e=null,i=o)}else e=null,i=o;return e}function ce(){var e,n,r,o;if(o=i,null!==(e=c())){for(n=[],null===(r=g())&&(45===t.charCodeAt(i)?(r="-",i++):(r=null,a('"-"')),null===r&&(95===t.charCodeAt(i)?(r="_",i++):(r=null,a('"_"'))));null!==r;)n.push(r),null===(r=g())&&(45===t.charCodeAt(i)?(r="-",i++):(r=null,a('"-"')),null===r&&(95===t.charCodeAt(i)?(r="_",i++):(r=null,a('"_"'))));null!==n?e=[e,n]:(e=null,i=o)}else e=null,i=o;return e}function qe(){var e,n,r,o,s;return o=i,s=i,91===t.charCodeAt(i)?(e="[",i++):(e=null,a('"["')),null!==e&&null!==(n=de())?(93===t.charCodeAt(i)?(r="]",i++):(r=null,a('"]"')),null!==r?e=[e,n,r]:(e=null,i=s)):(e=null,i=s),null!==e&&(e=function(e){return Pn.host_type="IPv6",t.substring(i,e)}(o)),null===e&&(i=o),e}function de(){var e,n,r,o,s,l,u,c,q,d,h,p,f,V,g,m;return V=i,g=i,null!==(e=he())?(58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=he())?(58===t.charCodeAt(i)?(o=":",i++):(o=null,a('":"')),null!==o&&null!==(s=he())?(58===t.charCodeAt(i)?(l=":",i++):(l=null,a('":"')),null!==l&&null!==(u=he())?(58===t.charCodeAt(i)?(c=":",i++):(c=null,a('":"')),null!==c&&null!==(q=he())?(58===t.charCodeAt(i)?(d=":",i++):(d=null,a('":"')),null!==d&&null!==(h=he())?(58===t.charCodeAt(i)?(p=":",i++):(p=null,a('":"')),null!==p&&null!==(f=pe())?e=[e,n,r,o,s,l,u,c,q,d,h,p,f]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=he())?(58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=he())?(58===t.charCodeAt(i)?(s=":",i++):(s=null,a('":"')),null!==s&&null!==(l=he())?(58===t.charCodeAt(i)?(u=":",i++):(u=null,a('":"')),null!==u&&null!==(c=he())?(58===t.charCodeAt(i)?(q=":",i++):(q=null,a('":"')),null!==q&&null!==(d=he())?(58===t.charCodeAt(i)?(h=":",i++):(h=null,a('":"')),null!==h&&null!==(p=pe())?e=[e,n,r,o,s,l,u,c,q,d,h,p]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=he())?(58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=he())?(58===t.charCodeAt(i)?(s=":",i++):(s=null,a('":"')),null!==s&&null!==(l=he())?(58===t.charCodeAt(i)?(u=":",i++):(u=null,a('":"')),null!==u&&null!==(c=he())?(58===t.charCodeAt(i)?(q=":",i++):(q=null,a('":"')),null!==q&&null!==(d=pe())?e=[e,n,r,o,s,l,u,c,q,d]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=he())?(58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=he())?(58===t.charCodeAt(i)?(s=":",i++):(s=null,a('":"')),null!==s&&null!==(l=he())?(58===t.charCodeAt(i)?(u=":",i++):(u=null,a('":"')),null!==u&&null!==(c=pe())?e=[e,n,r,o,s,l,u,c]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=he())?(58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=he())?(58===t.charCodeAt(i)?(s=":",i++):(s=null,a('":"')),null!==s&&null!==(l=pe())?e=[e,n,r,o,s,l]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=he())?(58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=pe())?e=[e,n,r,o]:(e=null,i=g)):(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=pe())?e=[e,n]:(e=null,i=g),null===e&&(g=i,"::"===t.substr(i,2)?(e="::",i+=2):(e=null,a('"::"')),null!==e&&null!==(n=he())?e=[e,n]:(e=null,i=g),null===e&&(g=i,null!==(e=he())?("::"===t.substr(i,2)?(n="::",i+=2):(n=null,a('"::"')),null!==n&&null!==(r=he())?(58===t.charCodeAt(i)?(o=":",i++):(o=null,a('":"')),null!==o&&null!==(s=he())?(58===t.charCodeAt(i)?(l=":",i++):(l=null,a('":"')),null!==l&&null!==(u=he())?(58===t.charCodeAt(i)?(c=":",i++):(c=null,a('":"')),null!==c&&null!==(q=he())?(58===t.charCodeAt(i)?(d=":",i++):(d=null,a('":"')),null!==d&&null!==(h=pe())?e=[e,n,r,o,s,l,u,c,q,d,h]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=he())?(m=i,58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=he())?n=[n,r]:(n=null,i=m),null!==(n=null!==n?n:"")?("::"===t.substr(i,2)?(r="::",i+=2):(r=null,a('"::"')),null!==r&&null!==(o=he())?(58===t.charCodeAt(i)?(s=":",i++):(s=null,a('":"')),null!==s&&null!==(l=he())?(58===t.charCodeAt(i)?(u=":",i++):(u=null,a('":"')),null!==u&&null!==(c=he())?(58===t.charCodeAt(i)?(q=":",i++):(q=null,a('":"')),null!==q&&null!==(d=pe())?e=[e,n,r,o,s,l,u,c,q,d]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=he())?(m=i,58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=he())?n=[n,r]:(n=null,i=m),null!==(n=null!==n?n:"")?(m=i,58===t.charCodeAt(i)?(r=":",i++):(r=null,a('":"')),null!==r&&null!==(o=he())?r=[r,o]:(r=null,i=m),null!==(r=null!==r?r:"")?("::"===t.substr(i,2)?(o="::",i+=2):(o=null,a('"::"')),null!==o&&null!==(s=he())?(58===t.charCodeAt(i)?(l=":",i++):(l=null,a('":"')),null!==l&&null!==(u=he())?(58===t.charCodeAt(i)?(c=":",i++):(c=null,a('":"')),null!==c&&null!==(q=pe())?e=[e,n,r,o,s,l,u,c,q]:(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g)):(e=null,i=g),null===e&&(g=i,null!==(e=he())?(m=i,58===t.charCodeAt(i)?(n=":",i++):(n=null,a('":"')),null!==n&&null!==(r=he())?n=[n,r]:(n=null,i