Thanks Juha, I figured that the avp reordering would be something like that.

The help file for versions 3.1 and 3.2 also says "randomized weight", does it really work on those versions?
 
this is from 3.2

***********************
When the function load_gws() is called, matching gateways (that are not currently designated as defunct) are ordered for forwarding purposes as follows:

    *      (1) according to longest user part match
    *      (2) according to tuple's priority
    *      (3) according to tuple's randomized weight
 
**********************

or do you mean the "priority" column on the "lcr_rule_target" table  instead?

This may be a dumb question but since I don't get it I have to ask: what is the purpose of the weight value then?

thank you
fborot






From: fborot@hotmail.com
To: users@lists.kamailio.org
Subject: LCR weight parameter
Date: Tue, 22 Nov 2011 06:39:44 -0500

Hello

On kamailio 1.5.2, I need to choose the gw from a group according to its weight. After trying unsuccessfully with different values I realized that the help guide says that the load_gw functions can return gateways according to "gateway's randomized weight within its group". So, I have these questions:

1- since it is "randomized", does this mean that the weight parameter actually can not guarantee that the weight value can decide how gateways are ordered?
2- once I have the gws on the avp, is it posible to re-order them? if so, how?

thank you very much

fborot