Hello I use dipatcher  algorithm 8 that works with weight. I added  2 Asterisks and try to call its with my kam.We use 4.3 version.

Tthis config select needed dst from database with my scenario. 

if(!ds_select_dst("$var(setid)", "8"))

$var(setid)- is variable for setting setid that i get from database with my own scenario. IT does not matter.

When running asterisk with weight 90 - all calls goes through it. When I starting asterisk with weight 10 -calls going through asterisk 90. When I shut down asterisk with weight 90 -calls goes through asterisk 10? but when i start asterisk weight 90 all calls goes through sterisk 10 until I shut down it.

root@Kamailio:~# kamailio -v
version: kamailio 4.3.0-dev3 (x86_64/linux) 8cdbe7
flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 8cdbe7
compiled on 01:17:56 Jan 21 2015 with gcc 4.8.2


id setid   destination                  flags priority attrs
1   2   sip:34.25.123.45:506000      0         weight=10

    
      
2   2   sip:10.0.1.6:506000      0weight=90

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")
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)


Thanks