<div dir="ltr"><div style>Jon,</div><div><br></div>I guess you can find the response in [1]<div><br></div><div>```</div>not operator in if()<br><br>if (!$fd=~“regexp”) must now be written as if (!($fd=~“regexp”)) for what reason ever.<br>
<br>Notice: the operator !~ seems not to be working for some reason as well.<br>e.g.: ($fd !~ &#39;not this&#39;) must be replaced with !($fd =~ &#39;not this&#39;)<div>```<br><div><br></div><div style>We found the same issue when starting with Kamailio 3.X</div>
<div style><br></div><div style>Hope this helps.</div><div><br></div><div>[1]: <a href="http://www.kamailio.org/dokuwiki/doku.php/install:1.5.x-to-3.0.0">http://www.kamailio.org/dokuwiki/doku.php/install:1.5.x-to-3.0.0</a></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/9 Jon Bonilla <span dir="ltr">&lt;<a href="mailto:manwe@aholab.ehu.es" target="_blank">manwe@aholab.ehu.es</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all<br>
<br>
I was checking for an operator not matching regular expression. Acording to the<br>
doc we have =~ and !~ for matching and not matching.<br>
<br>
<a href="http://www.kamailio.org/wiki/cookbooks/3.3.x/core#script_statements" target="_blank">http://www.kamailio.org/wiki/cookbooks/3.3.x/core#script_statements</a><br>
<br>
<br>
I tried this one:<br>
<br>
if(!is_domain_local(&quot;$rd&quot;) &amp;&amp; $rd !~ &quot;^.+\.local$&quot;)<br>
<br>
Resulting on these errors:<br>
<br>
root@sp1:~# /etc/init.d/kamailio-proxy restart<br>
Not executing command for kamailio-proxy: invalid configuration file!<br>
-e<br>
0(1813) : &lt;core&gt; [cfg.y:3549]: parse error in config file /etc/kamailio/proxy/proxy.cfg, line 1067, column 36: syntax error<br>
0(1813) : &lt;core&gt; [cfg.y:3549]: parse error in config file /etc/kamailio/proxy/proxy.cfg, line 1067, column 52: bad expression<br>
0(1813) : &lt;core&gt; [cfg.y:3549]: parse error in config file /etc/kamailio/proxy/proxy.cfg, line 1067, column 52: bad command<br>
0(1813) : &lt;core&gt; [cfg.y:3549]: parse error in config file /etc/kamailio/proxy/proxy.cfg, line 1068, column 2: bad command<br>
0(1813) : &lt;core&gt; [cfg.y:3546]: parse error in config file /etc/kamailio/proxy/proxy.cfg, line 1083, column 2-21: syntax error<br>
0(1813) : &lt;core&gt; [cfg.y:3546]: parse error in config file /etc/kamailio/proxy/proxy.cfg, line 1083, column 2-21:<br>
ERROR: bad config file (6 errors)<br>
<br>
<br>
<br>
while this one:<br>
<br>
if(!(is_domain_local(&quot;$rd&quot;) || $rd =~ &quot;^.+\.local$&quot;))<br>
<br>
<br>
Works perfectly fine.<br>
<br>
Am I wrong with the usage of !~ operator?<br>
<br>
<br>
<br>
cheers,<br>
<br>
Jon<br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>José Luis Millán
</div>