[SR-Users] AVPs - how many values on stack

Daniel-Constantin Mierla miconda at gmail.com
Wed Jun 13 14:44:03 CEST 2012


Hello,

there were some discussions in the past, I don't recall someone 
implemented a dedicated mechanism for it (I didn't).

The way to find out is a loop to count in config file:

$var(n) = 0;
while( $(avp(x)[$var(n)]) != $null ) $var(n) = $var(n) +1;

Cheers,
Daniel

On 6/13/12 12:02 PM, Olle E. Johansson wrote:
> I got this question today that I can't find the answer on:
>
> How many values are there in an avp?
>
> If I have pushed X values into the AVP - is there a function that counts them for me?
>
> /O
> _______________________________________________
> 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



-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw




More information about the sr-users mailing list