[OpenSIPS-Users] Sorting Lists of Data

Brett Nemeroff brett at nemeroff.com
Fri May 14 02:06:01 CEST 2010


Hello All,
I'm looking to numerically sort data.. Basically what I need is an array
with numerical data values to be sorted (yes, for pricing)


$avp(s:price)[0]=0.0125
$avp(s:price)[1]=0.0138
$avp(s:price)[2]=0.0128
$avp(s:price)[3]=0.0112
$avp(s:price)[4]=0.0005
$avp(s:price)[5]=0.0149


And I'd like to....

<magic>
$avp(s:price_sorted) = avp_sort("$avp(s:price)");
</magic>

Is that possible with.. anything? It doesn't need to be an AVP.. just
looking for any sortable data structure.

Thanks,
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100513/28701e7a/attachment.htm 


More information about the Users mailing list