[SR-Users] Multiple OR into a if

Igor Potjevlesch igor.potjevlesch at gmail.com
Tue Jan 27 16:02:50 CET 2015


The To header looks like this (in compact form):

 

t: <sip:0123456789 at sip.domain.tld>;tag=f15e211394273201512715012\r\n

 

Regards,

 

Igor.

 

De : Igor Potjevlesch [mailto:igor.potjevlesch at gmail.com] 
Envoyé : mardi 27 janvier 2015 15:55
À : miconda at gmail.com; 'Kamailio (SER) - Users Mailing List'
Objet : RE: [SR-Users] Multiple OR into a if

 

Hello Daniel,

 

Just to let you, it's in MANAGE_REPLY. Is that make any difference?

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-bounces at lists.sip-router.org] De la part de
Daniel-Constantin Mierla
Envoyé : mardi 27 janvier 2015 10:32
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] Multiple OR into a if

 

Hello,

can you paste here the SIP message (or at least the To header and request
URI) for such case? I would like to reproduce.

Also, you can try removing components of the expression in the second IF one
by one to see where it breaks.

Cheers,
Daniel

On 27/01/15 09:45, Igor Potjevlesch wrote:

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.





_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org> 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150127/88b6dc90/attachment.html>


More information about the sr-users mailing list