I see that you have setid 2 with two addresses, one with weight 10 and
one with weight 50. In total you give the weight 60. The module is
filling up to weight 100 using the last address returned from database,
so you can end up having first address with weight 10 and the second
with weight 90.
This algorithm ensures that in 100 routed calls, 10 are routed to the
first address and 90 to the second address. The order itself is
randomized at load time. For example, you can have first 3 calls routed
to address2, then 2 call to address1, then 8 calls to address2, then 8
calls to address1, then up to 100 routed to address2, after that is
repeating the same routing selection.
For set id 1 you have one address with weight 50, then practically in
memory it results in this address being with weight 100 (being the only
one in the setid), which is like routing always to it.
Given the above details, can you present more about what you observed
and what you would have expected to happen?
Cheers,
Daniel
PS. Just to be fully aware of: 4.3 is master branch and it is considered
unstable for production. But using it is encouraged, we fix the issues
to it with and helps getting it to stable state. At least in the regard
of dispacher and weight distribution, 4.3 and 4.2 are the same.
On 08/01/15 14:45, Yuriy Gorlichenko wrote:
We use 4.3 version.
if(!ds_select_dst("$var(setid)", "9"))
$var(setid)- is variable for setting setid that i get from database
with my own scenario. IT does not matter. You may change it to
something like 1,2, or anthing else.
So as you see setid 2 have 2 servers. I have an issue with this config
id setid destination flags priority attrs
1 2 sip:34.25.123.45:50600 <http://34.25.123.45:50600> 0
0 weight=10
2 1 sip:10.0.1.6:50600 <http://10.0.1.6:50600> 0 0
weight=50
3 2 sip:10.0.1.6:50600 <http://10.0.1.6:50600> 0 0
weight=50
2015-01-08 13:36 GMT+03:00 Daniel-Constantin Mierla <miconda(a)gmail.com
<mailto:miconda@gmail.com>>:
Hello,
what version are you using? Can you paste here the records you
have for the destination set (you can replace the ip addresses, I
am interested in attributes) and the ds_select_dst() or
ds_select_domain() lines from your config?
Cheers,
Daniel
On 08/01/15 04:07, Yuriy Gorlichenko wrote:
Hello I use dipatcher algorithm that works
with weight. I added
2 Asterisks and try to call its with my kam, but this still
works like 4 algorithm. Weight does not work.
How I must configure dispatchr for working with weight?
My configuration now is
modparam("dispatcher", "db_url",DBURL)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "destination_col",
"destination")
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "flags", 3)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")
modparam("dispatcher", "ds_ping_from", "sip:proxy@10.0.1.1
<mailto:sip%3Aproxy@10.0.1.1>")
modparam("dispatcher", "ds_ping_interval",15)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_reply_codes",
"class=2;code=403;code=404;code=484;class=3")
modparam("tm", "reparse_on_dns_failover", 0)
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -
http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users