[Kamailio-Users] Storing nonscalar types (lists)

Alex Balashov abalashov at evaristesys.com
Mon Feb 22 12:33:33 CET 2010


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/



More information about the Users mailing list