[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-devel
Subject:    [sr-dev] Bug in transformations in kamailio 1.5
From:       marius zbihlei <marius.zbihlei () 1and1 ! ro>
Date:       2010-04-28 13:19:41
Message-ID: 4BD835ED.3050601 () 1and1 ! ro
[Download RAW message or body]

Hello,

I have a small configuration file containing just the following lines in 
the route block:

    $var(domain1)="sip:+491@example.com";
    $var(domain2)="sip:491@example.com";
    if( $(var(domain1){uri.user}{re.subst,/^\+//}) == 
$(var(domain2){uri.user}) ) {
        if ($(var(domain1){uri.domain}) == $(var(domain2){uri.domain})) {
        xlog("L_ERR", "TEST OK");
        }else  {
        xlog("L_ERR", "TEST FAILED");
        }
    }

The user check is ok, but somehow in 1.5 the domain check  fails. I have 
dug a little deeper and it seems that when comparing the uri.domain 
str's they are wrong(it compares xample.com to example.com, but the 
length of the str is still 11). The only way I could replicate this was 
with the use of
a re.subst expression. I guess this is the culprit, as removing it fixed 
the problem.

Any ideas on why this happens?

I didn't manage to replicate in ser, will try in kamailio 3.0.

Marius




_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic