Hello,

On 08/28/07 04:44, Brandon Armstead wrote:
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!
it is not possible to have such index. If the time will allow, it will be there in 1.3. The only way to do it now is to rename the avp (see avp_copy()) in each iteration so the first one will be the one you need to check.

Cheers,
Daniel




--
Brandon Armstead
------------------------------------------------------------------------

_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to