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

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 16 21:14:32 CET 2009



On 16.11.2009 18:56 Uhr, Antonio Reale wrote:
> Hi Daniel,
> I have the value in the AVP, so I want to do something like this:
>
> avp_db_load("$avp(s:caller_uuid)", "$avp(s:code)");
> if (uri=~"^sip:$avp(code)[0-9]+@") {
> ...
> }
>
> but I know that I can't use the avp in this way.
>   
try this one:

$var(x) =  "^sip:" + $avp(code) + "[0-9]+@";

if($ru =~ $var(x)) {
...
}

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
* http://www.asipto.com/





More information about the sr-users mailing list