[SR-Users] Multiple OR into a if

Igor Potjevlesch igor.potjevlesch at gmail.com
Tue Jan 27 09:45:37 CET 2015


Hello,

 

I'm very disappointed because of the following behaviour:

 

     if ($tu=~"^sip:0[1-9]{9}") {

            [.]

            In that case, Kamailio returns TRUE because the instructions in
the block are executed.

        }

 

     if ($rU=~"^33" || $rU=~"^0033" || $rU=~"^0[1-9]{9}" || $rU=~"^\+33" ||
$tu=~"^sip:33" || $tu=~"^sip:0033" || $tu=~"^sip:0[1-9]{9}" ||
$tu=~"^sip:\+33" ) {

[.]

In that case, Kamailio should return FALSE because the instructions in the
block are not executed.

        }

 

Am I missed something regarding 'OR' ?

 

Regards,

 

Igor.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150127/4215bd30/attachment.html>


More information about the sr-users mailing list