### Description
We tried to load share 50+ media servers using dispatching algorithm 11 and faced an unexpected behavior when most calls go to very first host in the group.
### Troubleshooting I tried to start Kamailio like this: sudo kamailio -f /etc/kamailio/kamailio.cfg -E -d 5 -u 995 but errors were the same when dispatcher group had more than 25 and less than 25 hosts
It was tried different combinations of dispatcher list host group configuration: 100 sip:10.60.27.123:7000 10 rweight=50
100 sip:10.60.27.123:7000 10 weight=50;rweight=50
100 sip:10.60.27.123:7000 rweight=50,maxload=80
When making 100 calls the quarter of them go to the first host in the group.
#### Reproduction modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list") modparam("dispatcher", "flags", 2) modparam("dispatcher", "ds_ping_method", "OPTIONS") modparam("dispatcher", "ds_probing_threshold", 3) modparam("dispatcher", "ds_inactive_threshold", 10) modparam("dispatcher", "ds_probing_mode", 3) modparam("dispatcher", "ds_ping_interval", 10) modparam("dispatcher", "ds_ping_reply_codes", "501,403,404,400,200") modparam("dispatcher", "ds_ping_from",DS_PING_FROM_PARAM) modparam("dispatcher", "use_default", 0)
if ( ds_is_from_list("101")) { sl_send_reply("100","My calls"); ds_select_dst("100", "11"); return; }
Dispatcher group must have more than 25 hosts, if equal or less than 25 than it is Ok: 100 sip:10.60.27.123:7000 0 10 rweight=50 100 sip:10.60.27.123:7001 0 10 rweight=50 100 sip:10.60.27.123:7002 0 10 rweight=50 100 sip:10.60.27.123:7003 0 10 rweight=50 100 sip:10.60.27.123:7004 0 10 rweight=50 100 sip:10.60.27.123:7005 0 10 rweight=50 100 sip:10.60.27.123:7006 0 10 rweight=50 100 sip:10.60.27.123:7007 0 10 rweight=50 100 sip:10.60.27.123:7008 0 10 rweight=50 100 sip:10.60.27.123:7009 0 10 rweight=50 100 sip:10.60.27.123:7010 0 10 rweight=50 100 sip:10.60.27.123:7011 0 10 rweight=50 100 sip:10.60.27.123:7012 0 10 rweight=50 100 sip:10.60.27.123:7013 0 10 rweight=50 100 sip:10.60.27.123:7014 0 10 rweight=50 100 sip:10.60.27.123:7015 0 10 rweight=50 100 sip:10.60.27.123:7016 0 10 rweight=50 100 sip:10.60.27.123:7017 0 10 rweight=50 100 sip:10.60.27.123:7018 0 10 rweight=50 100 sip:10.60.27.123:7019 0 10 rweight=50 100 sip:10.60.27.123:7020 0 10 rweight=50 100 sip:10.60.27.123:7021 0 10 rweight=50 100 sip:10.60.27.123:7022 0 10 rweight=50 100 sip:10.60.27.123:7023 0 10 rweight=50 100 sip:10.60.27.123:7024 0 10 rweight=50
To emulate call load and multiple media servers, SIPp scenarios were used.
#### Debugging Data
#### Log Messages
#### SIP Traffic
No specific traffic, regular INVITE messages having international numbers.
### Possible Solutions
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` kamailio -v version: kamailio 5.4.4 (x86_64/linux) e16352 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: e16352 compiled on 15:56:46 Feb 15 2021 with gcc 4.8.5 ```
* **Operating System**:
``` CentOS Linux release 7.7.1908 (Core)
Linux test-carrier-1.prd.tc5.ams.nl.kwebbl.loc 3.10.0-1062.4.1.el7.x86_64 #1 SMP Fri Oct 18 17:15:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux ```