<p dir="ltr">Anyone got this one ?</p>
<p dir="ltr">sent from my mobile,<br>
Giovanni Maruzzelli<br>
cell: +39 347 266 56 18</p>
<div class="gmail_quote">On Sep 19, 2015 7:58 PM, "Giovanni Maruzzelli" <<a href="mailto:gmaruzz@gmail.com">gmaruzz@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello,<br><br></div><div>dispatcher gives me destination sets with entries in reverse order:<br></div><div><br>I have installed from Kamailio deb repository packages version 4.3.2+jessie.<br><br># kamailio -V<br>version: kamailio 4.3.2 (x86_64/linux) <br>flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, 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<br>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>id: unknown <br>compiled with gcc 4.9.2<br><br></div><div>I configured dispatcher:<br></div><div><br></div>modparam("dispatcher", "use_default", 1)<br>modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")<br>modparam("dispatcher", "flags", 3)<br>modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")<br>modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")<br>modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")<br>modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)")<br>modparam("dispatcher", "ds_ping_interval", 5)<br>modparam("dispatcher", "ds_probing_mode", 1)<br><br>I have this dispatcher.list:<br><br>1 sip:<a href="http://192.168.1.144:5060" target="_blank">192.168.1.144:5060</a> 2<br>1 sip:<a href="http://192.168.1.145:5060" target="_blank">192.168.1.145:5060</a> 2<br>1 sip:<a href="http://192.168.1.146:5060" target="_blank">192.168.1.146:5060</a> 2<br><br>2 sip:<a href="http://192.168.1.146:5060" target="_blank">192.168.1.146:5060</a> 2<br>2 sip:<a href="http://192.168.1.145:5060" target="_blank">192.168.1.145:5060</a> 2<br><br></div>So, I expect dispatcher to have:<br><br>set 1 first two destinations in distribution via hash on callid, and third destination as failover <a href="http://192.168.1.146:5060" target="_blank">(192.168.1.146</a>) .<br><div>set 2 all traffic on first destination, and if first fails, all traffic will failover to second destination (<a href="http://192.168.1.146:5060" target="_blank">192.168.1.145</a>).<br><br></div><div>Instead reindex_dests shuffle the sets upside down:<br><br>DEBUG: dispatcher [dispatch.c:375]: add_dest2list(): dest [1/1] <sip:<a href="http://192.168.1.144:5060" target="_blank">192.168.1.144:5060</a>><br>DEBUG: dispatcher [dispatch.c:375]: add_dest2list(): dest [1/2] <sip:<a href="http://192.168.1.145:5060" target="_blank">192.168.1.145:5060</a>><br>DEBUG: dispatcher [dispatch.c:375]: add_dest2list(): dest [1/3] <sip:<a href="http://192.168.1.146:5060" target="_blank">192.168.1.146:5060</a>><br>DEBUG: dispatcher [dispatch.c:375]: add_dest2list(): dest [2/1] <sip:<a href="http://192.168.1.146:5060" target="_blank">192.168.1.146:5060</a>><br>DEBUG: dispatcher [dispatch.c:375]: add_dest2list(): dest [2/2] <sip:<a href="http://192.168.1.145:5060" target="_blank">192.168.1.145:5060</a>><br>DEBUG: dispatcher [dispatch.c:494]: reindex_dests(): found [2] dest sets<br>DEBUG: dispatcher [dispatch.c:139]: ds_print_sets(): dst>> 2 sip:<a href="http://192.168.1.145:5060" target="_blank">192.168.1.145:5060</a> 2 0 (,0,0)<br>DEBUG: dispatcher [dispatch.c:139]: ds_print_sets(): dst>> 2 sip:<a href="http://192.168.1.146:5060" target="_blank">192.168.1.146:5060</a> 2 0 (,0,0)<br>DEBUG: dispatcher [dispatch.c:139]: ds_print_sets(): dst>> 1 sip:<a href="http://192.168.1.146:5060" target="_blank">192.168.1.146:5060</a> 2 0 (,0,0)<br>DEBUG: dispatcher [dispatch.c:139]: ds_print_sets(): dst>> 1 sip:<a href="http://192.168.1.145:5060" target="_blank">192.168.1.145:5060</a> 2 0 (,0,0)<br>DEBUG: dispatcher [dispatch.c:139]: ds_print_sets(): dst>> 1 sip:<a href="http://192.168.1.144:5060" target="_blank">192.168.1.144:5060</a> 2 0 (,0,0)<br>DEBUG: dispatcher [dispatcher.c:347]: mod_init(): loaded dispatching list<br><br></div><div>So, Kamailio give me set 1 and set 2 as per post-reindex_dests, and failover is 192.168.1.144 for set 1, and 192.168.1.146 for set 2.<br></div><div><br></div><div>Is this the expected behavior? <br></div><div>Am I doing something wrong in configuration?<br><br></div><div>Thank you all in advance,<br><br></div><div>-giovanni<br></div><div><br><br clear="all"><div><div><div><div>Sincerely,<br><br>Giovanni Maruzzelli<br>Cell : <a href="tel:%2B39-347-2665618" value="+393472665618" target="_blank">+39-347-2665618</a><br></div></div>
</div></div></div></div>
</blockquote></div>