[OpenSER-Users] AVP Iteration

Brandon Armstead brandon.armstead at gmail.com
Tue Aug 28 03:44:38 CEST 2007


Hello,

    I'm trying to setup some kind of iteration through an AVP list using
recursive routing, and use an AVP to create an "index" incrementing counter,
i.e.

if(is_avp_set("$avp(counter)")){
$avp(counter) = $avp(counter) + 1;
} else {
$avp(counter) = 0;
}

then I wish to apply to an avp index likewise:
if($avp(some_avp[$avp(counter)]) == null){ # this avp list index does not
exist, stop recursive routing } else { # keep doing operations }

However this is trivial, there seems not to be any easy way of going about
this, also openser.cfg errors out when I try to nest AVP's and use an AVP
value as an index value.

xl_parse_index: error parsing format [$avp(counter)])] expecting ']'
parse error (410,59-89): unknown script variable

Any thoughts?  All Appreciated, thank you!



-- 
Brandon Armstead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070827/8980a936/attachment.htm 


More information about the Users mailing list