diff --git a/src/Grammar/dist/Grammar.js b/src/Grammar/dist/Grammar.js index 4212feba8..3cc0d5b95 100644 --- a/src/Grammar/dist/Grammar.js +++ b/src/Grammar/dist/Grammar.js @@ -7980,8 +7980,9 @@ JsSIP.Grammar = (function(){ } if (result0 !== null) { result0 = (function(offset) { - var idx; - for (idx in data.multi_header) { + var idx, length; + length = data.multi_header.length; + for (idx = 0; idx < length; idx++) { if (data.multi_header[idx].parsed === null) { data = null; break; @@ -10237,8 +10238,9 @@ JsSIP.Grammar = (function(){ } if (result0 !== null) { result0 = (function(offset) { - var idx; - for (idx in data.multi_header) { + var idx, length; + length = data.multi_header.length; + for (idx = 0; idx < length; idx++) { if (data.multi_header[idx].parsed === null) { data = null; break; diff --git a/src/Grammar/dist/Grammar.min.js b/src/Grammar/dist/Grammar.min.js index 53f512e23..422e80866 100644 --- a/src/Grammar/dist/Grammar.min.js +++ b/src/Grammar/dist/Grammar.min.js @@ -135,22 +135,22 @@ UTF8_NONASCII:M,UTF8_CONT:T,LHEX:function(){var a;a=s();null===a&&(/^[a-f]/.test ctext:Pa,quoted_string:U,quoted_string_clean:ka,qdtext:V,quoted_pair:K,SIP_URI_noparams:la,SIP_URI:oa,uri_scheme:Qa,userinfo:ma,user:Ab,user_unreserved:Ra,password:Bb,hostport:na,host:W,hostname:Ta,domainlabel:Ua,toplabel:Cb,IPv6reference:pa,IPv6address:Va,h16:r,ls32:D,IPv4address:N,dec_octet:X,port:Sa,uri_parameters:yb,uri_parameter:Wa,transport_param:Db,user_param:Eb,method_param:Fb,ttl_param:Gb,maddr_param:Hb,lr_param:Ib,other_param:Jb,pname:Kb,pvalue:Lb,paramchar:Y,param_unreserved:Mb,headers:zb, header:ra,hname:Nb,hvalue:Ob,hnv_unreserved:Z,Request_Response:function(){var a;a=hc();null===a&&(a=Pb());return a},Request_Line:Pb,Request_URI:Qb,absoluteURI:Za,hier_part:Sb,net_path:Ub,abs_path:sa,opaque_part:Tb,uric:$,uric_no_slash:Yb,path_segments:Xb,segment:ta,param:$a,pchar:aa,scheme:Rb,authority:Wb,srvr:Zb,reg_name:ba,query:Vb,SIP_Version:Ya,INVITEm:$b,ACKm:ac,OPTIONSm:bc,BYEm:cc,CANCELm:dc,REGISTERm:ec,SUBSCRIBEm:fc,NOTIFYm:gc,Method:qa,Status_Line:hc,Status_Code:ic,extension_code:kc,Reason_Phrase:jc, Allow_Events:function(){var a,c,d,e,f,g;f=b;a=ca();if(null!==a){c=[];g=b;d=w();null!==d?(e=ca(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=w(),null!==d?(e=ca(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},Call_ID:function(){var a,c,d,h,j,l;j=h=b;a=Ja();null!==a?(l=b,64===e.charCodeAt(b)?(c="@",b++):(c=null,0===f&&g('"@"')),null!==c?(d=Ja(),null!==d?c=[c,d]:(c=null,b=l)):(c=null,b=l),c=null!==c?c:"",null!==c?a=[a, -c]:(a=null,b=j)):(a=null,b=j);null!==a&&(k=e.substring(b,h),a=void 0);null===a&&(b=h);return a},Contact:function(){var a,c,d,e,f,g,m;f=b;a=ub();if(null===a)if(g=b,a=ua(),null!==a){c=[];m=b;d=w();null!==d?(e=ua(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);for(;null!==d;)c.push(d),m=b,d=w(),null!==d?(e=ua(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);null!==c?a=[a,c]:(a=null,b=g)}else a=null,b=g;if(null!==a){for(var q in k.multi_header)if(null===k.multi_header[q].parsed){k=null;break}k=null!==k?k.multi_header: --1;a=void 0}null===a&&(b=f);return a},contact_param:ua,name_addr:O,display_name:va,contact_params:ab,c_p_q:lc,c_p_expires:mc,delta_seconds:P,qvalue:nc,generic_param:C,gen_value:oc,Content_Disposition:function(){var a,c,d,e,f,g;f=b;a=pc();if(null!==a){c=[];g=b;d=x();null!==d?(e=bb(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=x(),null!==d?(e=bb(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},disp_type:pc,disp_param:bb, -handling_param:qc,Content_Encoding:function(){var a,c,d,e,f,g;f=b;a=t();if(null!==a){c=[];g=b;d=w();null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=w(),null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},Content_Length:function(){var a,c,d;d=b;c=s();if(null!==c)for(a=[];null!==c;)a.push(c),c=s();else a=null;null!==a&&(k=parseInt(a.join("")),a=void 0);null===a&&(b=d);return a},Content_Type:function(){var a, -c;c=b;a=rc();null!==a&&(k=e.substring(b,c),a=void 0);null===a&&(b=c);return a},media_type:rc,m_type:sc,discrete_type:uc,composite_type:vc,extension_token:wa,x_token:wc,m_subtype:tc,m_parameter:cb,m_value:xc,CSeq:function(){var a,c,d,e;e=b;a=yc();null!==a?(c=A(),null!==c?(d=qa(),null!==d?a=[a,c,d]:(a=null,b=e)):(a=null,b=e)):(a=null,b=e);return a},CSeq_value:yc,Expires:function(){var a,c;c=b;a=P();null!==a&&(k=a,a=void 0);null===a&&(b=c);return a},Event:function(){var a,c,d,e,f,g,m;g=f=b;a=ca();if(null!== -a){c=[];m=b;d=x();null!==d?(e=C(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);for(;null!==d;)c.push(d),m=b,d=x(),null!==d?(e=C(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);null!==c?a=[a,c]:(a=null,b=g)}else a=null,b=g;null!==a&&(k.event=a[0].join("").toLowerCase(),a=void 0);null===a&&(b=f);return a},event_type:ca,From:function(){var a,c,d,e,f,g,m;g=f=b;a=la();null===a&&(a=O());if(null!==a){c=[];m=b;d=x();null!==d?(e=db(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);for(;null!==d;)c.push(d),m=b,d= -x(),null!==d?(e=db(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);null!==c?a=[a,c]:(a=null,b=g)}else a=null,b=g;if(null!==a){a=k.tag;try{k=new JsSIP.NameAddrHeader(k.uri,k.display_name,k.params),a&&k.setParam("tag",a)}catch(q){k=-1}a=void 0}null===a&&(b=f);return a},from_param:db,tag_param:eb,Max_Forwards:function(){var a,c,d;d=b;c=s();if(null!==c)for(a=[];null!==c;)a.push(c),c=s();else a=null;null!==a&&(k=parseInt(a.join("")),a=void 0);null===a&&(b=d);return a},Min_Expires:function(){var a,c;c=b; -a=P();null!==a&&(k=a,a=void 0);null===a&&(b=c);return a},Name_Addr_Header:function(){var a,c,d,e,f,g,m,q,p,r;p=q=b;a=[];for(c=va();null!==c;)a.push(c),c=va();if(null!==a)if(c=La(),null!==c)if(d=oa(),null!==d)if(e=Ka(),null!==e){f=[];r=b;g=x();null!==g?(m=C(),null!==m?g=[g,m]:(g=null,b=r)):(g=null,b=r);for(;null!==g;)f.push(g),r=b,g=x(),null!==g?(m=C(),null!==m?g=[g,m]:(g=null,b=r)):(g=null,b=r);null!==f?a=[a,c,d,e,f]:(a=null,b=p)}else a=null,b=p;else a=null,b=p;else a=null,b=p;else a=null,b=p;if(null!== -a){try{k=new JsSIP.NameAddrHeader(k.uri,k.display_name,k.params)}catch(s){k=-1}a=void 0}null===a&&(b=q);return a},Proxy_Authenticate:function(){return fb()},challenge:fb,other_challenge:zc,auth_param:da,digest_cln:xa,realm:Ac,realm_value:Hc,domain:Bc,URI:ya,nonce:Cc,nonce_value:Ic,opaque:Dc,stale:Ec,algorithm:Fc,qop_options:Gc,qop_value:za,Proxy_Require:function(){var a,c,d,e,f,g;f=b;a=t();if(null!==a){c=[];g=b;d=w();null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d), -g=b,d=w(),null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},Record_Route:function(){var a,c,d,e,f,g,m;g=f=b;a=Aa();if(null!==a){c=[];m=b;d=w();null!==d?(e=Aa(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);for(;null!==d;)c.push(d),m=b,d=w(),null!==d?(e=Aa(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);null!==c?a=[a,c]:(a=null,b=g)}else a=null,b=g;if(null!==a){for(var q in k.multi_header)if(null===k.multi_header[q].parsed){k=null;break}k= -null!==k?k.multi_header:-1;a=void 0}null===a&&(b=f);return a},rec_route:Aa,Require:function(){var a,c,d,e,f,g;f=b;a=t();if(null!==a){c=[];g=b;d=w();null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=w(),null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},Route:function(){var a,c,d,e,f,g;f=b;a=Ba();if(null!==a){c=[];g=b;d=w();null!==d?(e=Ba(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!== -d;)c.push(d),g=b,d=w(),null!==d?(e=Ba(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},route_param:Ba,Subscription_State:function(){var a,c,d,e,f,g;f=b;a=Jc();if(null!==a){c=[];g=b;d=x();null!==d?(e=gb(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=x(),null!==d?(e=gb(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},substate_value:Jc,subexp_params:gb,event_reason_value:Kc, -Subject:function(){var a;a=tb();return null!==a?a:""},Supported:function(){var a,c,d,e,f,g;f=b;a=t();if(null!==a){c=[];g=b;d=w();null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=w(),null!==d?(e=t(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return null!==a?a:""},To:function(){var a,c,d,e,f,g,m;g=f=b;a=la();null===a&&(a=O());if(null!==a){c=[];m=b;d=x();null!==d?(e=hb(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b= -m);for(;null!==d;)c.push(d),m=b,d=x(),null!==d?(e=hb(),null!==e?d=[d,e]:(d=null,b=m)):(d=null,b=m);null!==c?a=[a,c]:(a=null,b=g)}else a=null,b=g;if(null!==a){a=k.tag;try{k=new JsSIP.NameAddrHeader(k.uri,k.display_name,k.params),a&&k.setParam("tag",a)}catch(q){k=-1}a=void 0}null===a&&(b=f);return a},to_param:hb,Via:function(){var a,c,d,e,f,g;f=b;a=Ca();if(null!==a){c=[];g=b;d=w();null!==d?(e=Ca(),null!==e?d=[d,e]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)c.push(d),g=b,d=w(),null!==d?(e=Ca(),null!== -e?d=[d,e]:(d=null,b=g)):(d=null,b=g);null!==c?a=[a,c]:(a=null,b=f)}else a=null,b=f;return a},via_parm:Ca,via_params:ib,via_ttl:Nc,via_maddr:Oc,via_received:Pc,via_branch:Qc,response_port:Rc,sent_protocol:Lc,protocol_name:Sc,transport:Da,sent_by:Mc,via_host:Tc,via_port:Uc,ttl:Xa,WWW_Authenticate:function(){return fb()},extension_header:function(){var a,c,d,e;e=b;a=t();null!==a?(c=sb(),null!==c?(d=Vc(),null!==d?a=[a,c,d]:(a=null,b=e)):(a=null,b=e)):(a=null,b=e);return a},header_value:Vc,message_body:function(){var a, -b;a=[];for(b=Ia();null!==b;)a.push(b),b=Ia();return a},stun_URI:function(){var a,c,d,h;h=b;a=Wc();null!==a?(58===e.charCodeAt(b)?(c=":",b++):(c=null,0===f&&g('":"')),null!==c?(d=jb(),null!==d?a=[a,c,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);return a},stun_scheme:Wc,stun_host_port:jb,stun_host:Xc,reg_name:ba,stun_unreserved:kb,sub_delims:lb,turn_URI:function(){var a,c,d,h,j,k,m;k=b;a=Yc();null!==a?(58===e.charCodeAt(b)?(c=":",b++):(c=null,0===f&&g('":"')),null!==c?(d=jb(),null!==d?(m=b,"?transport="=== -e.substr(b,11)?(h="?transport=",b+=11):(h=null,0===f&&g('"?transport="')),null!==h?(j=Da(),null!==j?h=[h,j]:(h=null,b=m)):(h=null,b=m),h=null!==h?h:"",null!==h?a=[a,c,d,h]:(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k);return a},turn_scheme:Yc,turn_transport:function(){var a,c,d,h,j;j=h=b;a=Da();if(null!==a){"udp"===e.substr(b,3).toLowerCase()?(c=e.substr(b,3),b+=3):(c=null,0===f&&g('"udp"'));if(null===c&&("tcp"===e.substr(b,3).toLowerCase()?(c=e.substr(b,3),b+=3):(c=null,0===f&&g('"tcp"')), -null===c)){c=[];for(d=y();null!==d;)c.push(d),d=y()}null!==c?a=[a,c]:(a=null,b=j)}else a=null,b=j;null!==a&&(k.transport=transport,a=void 0);null===a&&(b=h);return a}};if(void 0!==E){if(void 0===Zc[E])throw Error("Invalid rule name: "+pb(E)+".");}else E="CRLF";var b=0,f=0,Q=0,Ha=[],k={};if(null===Zc[E]()||b!==e.length){for(var mb=Math.max(b,Q),bd=mb