[SR-Users] $rU rewrite problem
Dmitri Korotkov
dmitri.korotkov at festart.ee
Mon Jul 5 17:44:43 CEST 2010
Hi Alex,
There was a simplified example in my previous message. In real I have to
use regexp to extract two parts from the $rU and use one as new $rU and
other one for system purporses.
Br,
Dmitri
05.07.2010 17:52, Alex Balashov пишет:
> Dmitri,
>
> Why not do this instead?
>
> if($rU =~ "^99")
> strip(2);
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
> 1170 Peachtree Street
> 12th Floor, Suite 1200
> Atlanta, GA 30309
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/
>
> On Jul 5, 2010, at 10:38 AM, Dmitri Korotkov
> <dmitri.korotkov at festart.ee> wrote:
>
>> Hello,
>>
>> I have problems with rewriting $rU.
>> Kamailio 3.0.1 on debian squeeze x86_64
>>
>> In config file I have:
>>
>> $avp(s:dnumber) = $(ru{re.subst,/^sip:\*99\*(.*)@.*/\1/});
>> $rU=$avp(s:dnumber);
>>
>> And log file shows following warnings:
>>
>> Jul 5 17:22:30 voice /usr/sbin/kamailio[23641]: WARNING: <core>
>> [rvalue.c:987]: automatic string to int conversion for
>> "sip:1234567890 at voice.serv.net" failed
>> Jul 5 17:22:30 voice /usr/sbin/kamailio[23641]: WARNING: <core>
>> [rvalue.c:1839]: rval expression conversion to int failed
>> (630,22-630,23)
>>
>> Could you please show any samples how to change $rU with regexp
>> matched part of $rU ?
>>
>> BR,
>> Dmitri
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
More information about the sr-users
mailing list