[OpenSIPS-Users] [NEW] More enhancements in DISPATCHER module

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu May 21 19:03:19 CEST 2009


Hi,

I just added 2 new interesting enhancements to the dispatcher module (on 
OpenSIPS 1.6 / trunk ) :


Weight for destination
=======================

The definition of the destinations includes a weight of that 
destination. This weight is to be used for controlling the distribution 
(as ratio) between the peers. Without weight, a relating equal shares of 
traffic is sent to all the peers; using weights, you can sent different 
shares (like 25% for one destinations, 60% to other and 15% to the third).

The weights are not necessary percentages - they simply define the 
distribution between the destinations, in a similar way as weights works 
for DNS : a entry with higher weight will have higher chances to be 
selected.

The weights to not affect the existing dispatching algorithms - it works 
for all except the Round Robin algorithm were weight is simply ignored.



Attributes for destination
==========================

The definition of the destinations includes a opaque string of 
attributes of that destination. This string is not used by the 
dispatcher module at all - it is simply made available in script 
whenever the destination is selected (by the functions of the dispatcher 
module).

This attribute string may encode whatever information about the 
destination, information useful to have when you use the destination. To 
get the attributes string, you simply have to put the string in the 
destination definition (DB or file) and to define the module parameter 
"attrs_avp" - this is the AVP that will be populated with the attribute 
string.

Regards,
Bogdan



More information about the Users mailing list