<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>I was traveling during the past two weeks and didn't have the
      time to look properly at it. Hopefully today or tomorrow I will
      get to it.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 29.05.17 23:14, Cristi Constantin
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAN_4h-eUoOvgYhpweV1BPc=k8pbCn2g+_CCPjnbhPxrPC75s6A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Daniel,
        <div><br>
        </div>
        <div>Did you got the chance to look at the trace attached?</div>
        <div>I still not managed to figure out why failover is not
          working in my Kamailio configuration.. </div>
        <div><br>
        </div>
        <div>Thank you,</div>
        <div>Cristian</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, May 25, 2017 at 5:17 PM, Cristi
          Constantin <span dir="ltr"><<a moz-do-not-send="true"
              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">Hi Daniel,
              <div><br>
              </div>
              <div>I attached a pcap trace. It contains several SIP
                messages, but please check the INVITEs from 10.224.74.36
                (Kamailio) to <a moz-do-not-send="true"
                  href="http://10.126.54.51/10.126.55.51"
                  target="_blank">10.126.54.51/10.126.55.51</a>.</div>
              <div><br>
              </div>
              <div>Thanks for you support,</div>
              <div>Cristian</div>
            </div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Thu, May 25, 2017 at 5:04
                    PM, Daniel-Constantin Mierla <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:miconda@gmail.com" target="_blank">miconda@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">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">
                          <div>
                            <div class="m_-3706102619459100822h5">On
                              Thu, May 25, 2017 at 2:18 PM, Cristi
                              Constantin <span dir="ltr"><<a
                                  moz-do-not-send="true"
                                  href="mailto:cristi.constantin@gmail.com"
                                  target="_blank">cristi.constantin@gmail.com</a>></span>
                              wrote:<br>
                            </div>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div>
                              <div class="m_-3706102619459100822h5">
                                <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_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>7
                                    sip:<a moz-do-not-send="true"
                                      href="http://10.126.54.51:5060"
                                      target="_blank">10.126.54.51:5060</a>;transpor<wbr>t=sctp
                                    9 1</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>7
                                    sip:<a moz-do-not-send="true"
                                      href="http://10.126.55.51:5060"
                                      target="_blank">10.126.55.51:5060</a>;transpor<wbr>t=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
                                      moz-do-not-send="true"
                                      href="http://10.126.55.51:5060"
                                      target="_blank">10.126.55.51:5060</a>;transpor<wbr>t=sctp</div>
                                  <div>                                 
                                          FLAGS: AP</div>
                                  <div>                                 
                                          PRIORITY: 2</div>
                                  <div>                                }</div>
                                  <div>                               
                                    DEST: {</div>
                                  <div>                                 
                                          URI: sip:<a
                                      moz-do-not-send="true"
                                      href="http://10.126.54.51:5060"
                                      target="_blank">10.126.54.51:5060</a>;transpor<wbr>t=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_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "list_file",
                                    "/etc/kamailio/dispatcher.list<wbr>")</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "flags", 2)</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "ds_ping_interval", 10)</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "ds_ping_method", "OPTIONS")</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "ds_ping_from",
                                    <a class="moz-txt-link-rfc2396E" href="sip:kamailio@sdp-t-lb2">"sip:kamailio@sdp-t-lb2"</a>)</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "ds_probing_mode", 3)</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "dst_avp", "$avp(AVP_DST)")</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "grp_avp", "$avp(AVP_GRP)")</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-1942699592390341046gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>modparam("dispatcher",
                                    "cnt_avp", "$avp(AVP_CNT)")</div>
                                  <div><span class="m_-3706102619459100822m_8398944217705792573m_-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>
                              </div>
                            </div>
                            ______________________________<wbr>_________________<br>
                            Kamailio (SER) - Users Mailing List<br>
                            <a moz-do-not-send="true"
                              href="mailto:sr-users@lists.kamailio.org"
                              target="_blank">sr-users@lists.kamailio.org</a><br>
                            <a moz-do-not-send="true"
                              href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                              rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
                            <br>
                          </blockquote>
                        </div>
                        <span class="m_-3706102619459100822HOEnZb"><font
                            color="#888888"><br>
                            <br clear="all">
                            <div><br>
                            </div>
                            -- <br>
                            <div
                              class="m_-3706102619459100822m_8398944217705792573gmail_signature"
                              data-smartmail="gmail_signature">
                              <div dir="ltr">
                                <div>
                                  <div dir="ltr">
                                    <div>Daniel-Constantin Mierla - <a
                                        moz-do-not-send="true"
                                        href="http://www.asipto.com"
                                        target="_blank">http://www.asipto.com</a></div>
                                    <div><a moz-do-not-send="true"
                                        href="http://twitter.com/#%21/miconda"
                                        target="_blank">http://twitter.com/#!/miconda</a>
                                      - <a moz-do-not-send="true"
                                        href="http://www.linkedin.com/in/miconda"
                                        target="_blank">http://www.linkedin.com/in/mic<wbr>onda</a></div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </font></span></div>
                      <br>
                      ______________________________<wbr>_________________<br>
                      Kamailio (SER) - Users Mailing List<br>
                      <a moz-do-not-send="true"
                        href="mailto:sr-users@lists.kamailio.org"
                        target="_blank">sr-users@lists.kamailio.org</a><br>
                      <a moz-do-not-send="true"
                        href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                        rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - May 22-24 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>