[SR-Users] Dispatcher algorithm 9 ignores weight=xx attribute

Alejandro Recarey alexrecarey at gmail.com
Fri Sep 5 01:36:59 CEST 2014


Hi,

I have a kamailio with the dispatcher module setup. I use:

    ds_select_dst("1", "9");

to load balance between 3 gateways.

My database looks like this:

id  setid  destination  flags priority  attrs

5 1 sip:1.1.1.1 0 0 weight=10
8 1 sip:1.1.1.2 0 0 weight=45
9 1 sip:1.1.1.3 0 0 weight=45

As I understand it, most of the calls should be split evenly between
gateways 8 and 9, and some calls (around 10%) going to gateway 5.

Well, gateway 8 gets 99% of the calls. I am using kamailio 4.1 and I really
cannot understand why this is happening. Running ds_list shows me that all
gateays and weights are correctly parsed into kamailio.

This is the result of my ds_list:

SET:: 1
URI:: sip:1.1.1.1 flags=AP priority=0 attrs=weight=10
URI:: sip:1.1.1.2 flags=AP priority=0 attrs=weight=45
URI:: sip:1.1.1.3 flags=AP priority=0 attrs=weight=45

I have tried changing the priority to 100, or to 1 in every gateway, and
the result is still the same. I have tried adding ; after the weight
parameter, the colon is gone in the ds_list once kamailio parses it.

If, keeping the same database, I use ds_select_dst("1", "0") the calls are
split evenly across all 3 gateways. This is great, but not what I want, but
it at least proves that something is working.

Is there anything else I can try?

Thanks a lot for the help!

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140905/e1ee82a2/attachment.html>


More information about the sr-users mailing list