[Kamailio-Users] Test a string concatenated with an AVP
Antonio Reale
ant.reale at gmail.com
Mon Nov 16 18:56:23 CET 2009
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.
Thank you.
--
Antonio.
2009/11/16 Daniel-Constantin Mierla <miconda at gmail.com>:
> Hello,
>
> On 16.11.2009 18:41 Uhr, Antonio Reale wrote:
>>
>> Hi all,
>> actually I test if the R-URI contains the value *44* with:
>>
>> if (uri=~"^sip:\*44\*[0-9]+@") {
>> ...
>> }
>>
>> Now I want to read the value 44 or *44* from an AVP.
>> Tried using directly the avp or assigning it to a variable, without
>> success.
>> ex.:
>> $var(x) = "sip:" + $avp(s:code) + "[0-9]+@";
>>
>> How can I solve this problem?
>>
>
> do you want to get the value in avp? or you have the value in the avp? I do
> not get it from your question. For first, it is not right. For the second is
> not right also.
>
> If it is first, then see the transformations:
> - s.substr
> - s.select
> - re.subst
> http://www.kamailio.org/dokuwiki/doku.php/transformations:1.5.x
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> * http://www.asipto.com/
>
>
More information about the Users
mailing list