[Kamailio-Users] Test a string concatenated with an AVP

Antonio Reale ant.reale at gmail.com
Tue Nov 17 11:44:23 CET 2009


2009/11/16 Daniel-Constantin Mierla <miconda at gmail.com>:
>
> try this one:
>
> $var(x) =  "^sip:" + $avp(code) + "[0-9]+@";
>
> if($ru =~ $var(x)) {
> ...
> }

Sorry Daniel, it was my fault. The AVP was not loaded at that point of
the script. Now works fine.
Only a question. Previously I had
if(uri  =~ ...)
but I can't compare it with var(x).
I know that $ru is a pseudo variable and "uri" is a core keyword.
Can I change all my "if(uri =~ ...)" with "if($ru ~ ...)" without
impact the actual configuration?

> Cheers,
> Daniel

Thank you very much.
Regards.

-- 
Antonio



More information about the Users mailing list