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

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 16 18:47:07 CET 2009


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 sr-users mailing list