[Serusers] how to sort data retrieved from avp_db_load in avpops module

Marian Dumitru marian.dumitru at voice-sistem.ro
Sun Mar 20 19:41:59 CET 2005


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.

Regarding the timeout value, to set different values for each step, just 
do :
	avp_write("i:10", "fr_inv_timer_avp");
before each call of t_relay() - instead of 10, put whatever value you want;

If you are using the development branch, you can set the value for 
timeout directly from another AVP (perhaps loaded also from DB):
	avp_copy("my_avp", "fr_inv_timer_avp");

Best regards,
Marian


PHAN, Quang-Minh (Docteur Ordinateur) wrote:
> Hi List,
> 
>     I want to implement serial forking with avpops module and I have 
> this problem. The set of destinations for each user is stored in a 
> database and I use apv_db_load to load it. However, I couldn't find a 
> way to sort them in the right order. For example, I cant tell SER to try 
> destination A before B, then C because there is no way to specify this 
> in the database. Another feature I want to implement is to allow a 
> client to specify a timeout for a destination. Eg. Try A for x seconds, 
> then try B for y seconds, then try C.
> 
>     I wonder if there are ways to implement the services above using 
> actual ser modules or it's not yet possible.
> 
> Best regards,
> 
> Minh
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers


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




More information about the sr-users mailing list