<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">kamcmd dispatcher.list shows gateways in reverse order (comparing to the file) and "last hope" gw is the last one here (URI: sip:<a href="http://10.6.3.122:5060">10.6.3.122:5060</a>).</div><div dir="ltr"><br></div><div dir="ltr"><div><div> SET: {</div><div> ID: 4</div><div> TARGETS: {</div><div> DEST: {</div><div> URI: sip:<a href="http://10.6.3.5:5060">10.6.3.5:5060</a></div><div> FLAGS: AX</div><div> PRIORITY: 0</div><div> }</div><div> DEST: {</div><div> URI: sip:<a href="http://10.6.3.4:5060">10.6.3.4:5060</a></div><div> FLAGS: AX</div><div> PRIORITY: 0</div><div> }</div><div> DEST: {</div><div> URI: sip:<a href="http://10.6.3.3:5060">10.6.3.3:5060</a></div><div> FLAGS: AX</div><div> PRIORITY: 0</div><div> }</div><div> DEST: {</div><div> URI: sip:<a href="http://10.6.3.2:5060">10.6.3.2:5060</a></div><div> FLAGS: AX</div><div> PRIORITY: 0</div><div> }</div><div> DEST: {</div><div> URI: sip:<a href="http://10.6.3.1:5060">10.6.3.1:5060</a></div><div> FLAGS: AX</div><div> PRIORITY: 0</div><div> }</div><div> DEST: {</div><div> URI: sip:<a href="http://10.6.3.122:5060">10.6.3.122:5060</a></div><div> FLAGS: AX</div><div> PRIORITY: 0</div><div> }</div><div> }</div><div> }</div></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 26 февр. 2019 г. в 17:24, Denys Pozniak <<a href="mailto:denys.pozniak@gmail.com">denys.pozniak@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello!</div><div><br></div><div>I use dispatcher with algorithm=1 (hashing over from URI) with module parameter use_default=1.</div><div>So I am expecting that last string in dispatcher.list for specific set will be the "last hope" for call routing.</div><div><br></div><div>dispatcher.list<br></div><div dir="ltr"><div>..</div><div><div>4 sip:<a href="http://10.6.3.122:5060" target="_blank">10.6.3.122:5060</a><br></div><div>4 sip:<a href="http://10.6.3.1:5060" target="_blank">10.6.3.1:5060</a></div><div>4 sip:<a href="http://10.6.3.2:5060" target="_blank">10.6.3.2:5060</a></div><div>4 sip:<a href="http://10.6.3.3:5060" target="_blank">10.6.3.3:5060</a></div><div>4 sip:<a href="http://10.6.3.4:5060" target="_blank">10.6.3.4:5060</a></div><div>4 sip:<a href="http://10.6.3.5:5060" target="_blank">10.6.3.5:5060</a></div></div><div><br></div><div>But as I see from logs dispatcher module takes first string as the "last hope":</div><div><br></div><div>xlog("L_WARN", "TEST-- $(avp(AVP_DST)[0]) $(avp(AVP_DST)[1]) $(avp(AVP_DST)[2]) $(avp(AVP_DST)[3]) $(avp(AVP_DST)[4]) $(avp(AVP_DST)[5]) $(avp(AVP_DST)[6]) \n");<br></div><div><br></div><div><div>Feb 26 16:11:39 kamailio-2 /usr/sbin/kamailio[28156]: WARNING: <script>: TEST-- sip:<a href="http://10.6.3.4:5060" target="_blank">10.6.3.4:5060</a> sip:<a href="http://10.6.3.3:5060" target="_blank">10.6.3.3:5060</a> sip:<a href="http://10.6.3.2:5060" target="_blank">10.6.3.2:5060</a> sip:<a href="http://10.6.3.1:5060" target="_blank">10.6.3.1:5060</a> sip:<a href="http://10.6.3.5:5060" target="_blank">10.6.3.5:5060</a> sip:<a href="http://10.6.3.122:5060" target="_blank">10.6.3.122:5060</a> <null><br></div><div><div>Feb 26 16:11:58 kamailio-2 /usr/sbin/kamailio[28156]: WARNING: <script>: TEST-- sip:<a href="http://10.6.3.3:5060" target="_blank">10.6.3.3:5060</a> sip:<a href="http://10.6.3.2:5060" target="_blank">10.6.3.2:5060</a> sip:<a href="http://10.6.3.1:5060" target="_blank">10.6.3.1:5060</a> sip:<a href="http://10.6.3.5:5060" target="_blank">10.6.3.5:5060</a> sip:<a href="http://10.6.3.4:5060" target="_blank">10.6.3.4:5060</a> sip:<a href="http://10.6.3.122:5060" target="_blank">10.6.3.122:5060</a> <null></div></div><div><div>Feb 26 16:11:59 kamailio-2 /usr/sbin/kamailio[28156]: WARNING: <script>: TEST-- sip:<a href="http://10.6.3.2:5060" target="_blank">10.6.3.2:5060</a> sip:<a href="http://10.6.3.1:5060" target="_blank">10.6.3.1:5060</a> sip:<a href="http://10.6.3.5:5060" target="_blank">10.6.3.5:5060</a> sip:<a href="http://10.6.3.4:5060" target="_blank">10.6.3.4:5060</a> sip:<a href="http://10.6.3.3:5060" target="_blank">10.6.3.3:5060</a> sip:<a href="http://10.6.3.122:5060" target="_blank">10.6.3.122:5060</a> <null></div></div><div><div>Feb 26 16:12:08 kamailio-2 /usr/sbin/kamailio[28156]: WARNING: <script>: TEST-- sip:<a href="http://10.6.3.1:5060" target="_blank">10.6.3.1:5060</a> sip:<a href="http://10.6.3.5:5060" target="_blank">10.6.3.5:5060</a> sip:<a href="http://10.6.3.4:5060" target="_blank">10.6.3.4:5060</a> sip:<a href="http://10.6.3.3:5060" target="_blank">10.6.3.3:5060</a> sip:<a href="http://10.6.3.2:5060" target="_blank">10.6.3.2:5060</a> sip:<a href="http://10.6.3.122:5060" target="_blank">10.6.3.122:5060</a> <null></div></div><br class="gmail-m_6973636873582051115gmail-Apple-interchange-newline"></div><div>According to the module explanation it should be "<span style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:15px;text-align:justify">the last address in destination set is used as a final option to send the request to</span>"</div><div><span style="text-align:justify"><br></span></div><div><span style="text-align:justify"><br></span></div><div><span style="text-align:justify">version: kamailio 4.4.2 (x86_64/linux) 892ad6</span><br></div><div><div>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, 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</div><div>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB</div><div>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</div><div>id: 892ad6</div><div>compiled on 12:58:38 Aug 28 2017 with gcc 4.8.5</div></div><div><br></div><div><br></div><div>-- <br></div><div dir="ltr" class="gmail-m_6973636873582051115gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div>