Hi all,

    Thanks you for your help. I think I can implement a multi-forwarding service now but I think I should spend sometime trying to add some ordering mechanism to avpops module because basing on order from database is not enough for such kind of service.

Minh


-----Message d'origine-----
De: serusers-bounces@lists.iptel.org
A: Richard
Cc: serusers@lists.iptel.org
Date: 20/03/2005 20:28
Objet: Re: [Serusers] how to sort data retrieved from avp_db_load in avpopsmodule

Richard wrote:
>>Hi Minh,
>>
>>After loading the AVPs via apv_db_load() function you will have in
>>memory the AVP list exactly in the revert order than in database. Ex:
if
>>you had for avp "test" values A, B, C and D, after loading you will
have
>>the order D, C, B and A.
>
>
> Can anyone think of a way to set the order in the database? I think
that it
> is probably impractical, if not impossible.

If you want to have ordering for AVP of same name/ID at load_db time you

need to relay on some information/order already existing in the DB. At
the moment, the only available criteria is the DB order itself.

>
> Is this reverse order by design or by implementation? My ser logic
heavily
> relies on the behavior. I wonder if any future upgrade might break it
if it
> is just how the code is implemented.

The revert order is a effect of how the AVP core is implemented - the
AVPs are kept in singled-linked list and any new APV is added at the
beginning of the list.

Best regards,
Marian

--
Voice System
http://www.voice-system.ro

_______________________________________________
Serusers mailing list
serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers