<div dir="ltr">Hello,<div><br></div><div>can you sent pcap or ngrep output with all sip messages of such case exposing the issue you have?</div><div><br></div><div>Cheers,<br>Daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 25, 2017 at 2:18 PM, Cristi Constantin <span dir="ltr"><<a href="mailto:cristi.constantin@gmail.com" target="_blank">cristi.constantin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>I have an issue with the behavior of ds_select_dst() method in case of using algorithm 8 (dispatch based on priority). In case both destinations are available, they are used alternatively, instead of always using the one with the highest priority.</div><div><br></div><div>By searching through the mailing list I found that the lower the priority number, the higher the priority (1 is first, 2 is second, etc.).</div><div>Based on this, I set the following in dispatcher.list:</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>7 sip:<a href="http://10.126.54.51:5060">10.126.54.51:5060</a>;<wbr>transport=sctp 9 1</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>7 sip:<a href="http://10.126.55.51:5060">10.126.55.51:5060</a>;<wbr>transport=sctp 9 2</div><div><br></div><div>After running "kamcmd dispatcher.reload" and "kamcmd dispatcher.list", I have the confirmation that the priorities are correctly set:</div><div>                SET: {</div><div>                        ID: 7</div><div>                        TARGETS: {</div><div>                                DEST: {</div><div>                                        URI: sip:<a href="http://10.126.55.51:5060">10.126.55.51:5060</a>;<wbr>transport=sctp</div><div>                                        FLAGS: AP</div><div>                                        PRIORITY: 2</div><div>                                }</div><div>                                DEST: {</div><div>                                        URI: sip:<a href="http://10.126.54.51:5060">10.126.54.51:5060</a>;<wbr>transport=sctp</div><div>                                        FLAGS: AP</div><div>                                        PRIORITY: 1</div><div>                                }</div><div>                        }</div><div>                }</div><div><br></div><div>The dispatcher settings from kamailio.cfg is the following:</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.<wbr>list")</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>modparam("dispatcher", "flags", 2)</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>modparam("dispatcher", "ds_ping_interval", 10)</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">  </span>modparam("dispatcher", "ds_ping_method", "OPTIONS")</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>modparam("dispatcher", "ds_ping_from", "sip:kamailio@sdp-t-lb2")</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>modparam("dispatcher", "ds_probing_mode", 3)</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")</div><div><span class="m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)")</div><div><br></div><div>And the code which should do the displatch is the following:</div><div><br></div><div>      if (ds_is_from_list(7, 3, "$ru")) {</div><div>          remove_hf("Route");</div><div>          if(!ds_select_dst("7", "8")) {</div><div>            send_reply("404", "No destination");</div><div>            exit;</div><div>          }</div><div>      }</div><div><br></div><div>With the settings above, I was expecting to always have the messages delivered to 10.126.54.51. Instead, they are dispathed to 10.126.54.51 and 10.126.55.51 alternatively.</div><div><br></div><div>Thanks a lot,</div><div>Cristian</div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></div><div><a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></div></div></div></div></div>
</div>