Are AVP arrays still the only way to create a list of scalars as of K 3.0.0? Or are there other, more graceful ways to accommodate this need now?

AVPs are a very useful feature, though the syntax is not documented in 'avpops' or the cookbook except rather incidentally:

   $var(i) = 0;

   while(is_avp_set("$(avp(s:somename)[$var(i)])")) {
xlog("L_INFO", "Value at index $var(i): $(avp(s:somename)][$var(i)])\n");
           $var(i) = $var(i) + 1;
   }

Is there a better way to handle this now, perhaps via some features imported from SER? Script variables ($var(...)) do not support subscripts judging by the cookbook; do they? Are there other options I am unaware of?

Thanks,

--
Alex Balashov - Principal
Evariste Systems LLC

Tel    : +1 678-954-0670
Direct : +1 678-954-0671
Web    : http://www.evaristesys.com/

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Reply via email to