<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 28/10/15 15:49, Alessio Casco wrote:<br>
    </div>
    <blockquote
cite="mid:CAPeOiHEv9G6Gtb1zbb2NdiKd-=4NF0EjmQHFAn5F7mhimwL1oA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello!
        <div><br>
        </div>
        <div>Thanks to @cezar91 we finally spot the issue, basically
          kamailio it's transforming t_code=0 (timeout) to 408 and the
          dispatcher module sees this last value.</div>
        <div><br>
        </div>
        <div>
          <div>Oct 28 14:16:32 net21-test /usr/sbin/kamailio[31911]:
            DEBUG: tm [t_reply.c:1311]: t_should_relay_response():
            ->>>>>>>>> T_code=0, new_code=408</div>
          <div>Oct 28 14:16:32 net21-test /usr/sbin/kamailio[31911]:
            DEBUG: tm [t_reply.c:2135]: local_reply(): DEBUG: local
            transaction completed 408/0 (totag retr: 0/1024)</div>
          <div>Oct 28 14:16:32 net21-test /usr/sbin/kamailio[31911]:
            DEBUG: dispatcher [dispatch.c:2489]: ds_options_callback():
            OPTIONS-Request was finished with code 408 (to
            <a class="moz-txt-link-freetext" href="sip:media21-test.internal:5060">sip:media21-test.internal:5060</a>, group 3)</div>
        </div>
        <div><br>
        </div>
        <div>So if you set on "ds_ping_reply_codes" class=4 or code=408,
          kamailio will consider the backend up even if it doesn't
          actually receives that specific code.</div>
        <div><br>
        </div>
        <div>Do you think it worth to update the docs and advice about
          this behaviour?</div>
        <div>I just spot now the typo on the first email about the code
          sorry!<br>
        </div>
      </div>
    </blockquote>
    <br>
    Feel free to do a pull request on github for dispatcher
    documentation where you add the notes you think it helps clarifying
    better such situation. Contributions to documentation are always
    welcome!<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:CAPeOiHEv9G6Gtb1zbb2NdiKd-=4NF0EjmQHFAn5F7mhimwL1oA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks for your help</div>
        <div>Alessio</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Oct 28, 2015 at 12:53 PM,
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
              <br>
              can you want the network traffic and see if the OPTIONS
              requests are sent out?<br>
              <br>
              Cheers,<br>
              Daniel
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 27/10/15 18:59, Alessio Casco wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hello Daniel!
                      <div><br>
                      </div>
                      <div>Adding the sock_avp parameter, fixes the
                        error on the log, but the behaviour is the same
                        as before.</div>
                      <div><br>
                      </div>
                      <div>
                        <div><br>
                        </div>
                      </div>
                      <div>As you can see, with nothing listening on
                        those two servers, the loadbalancing it's still
                        disables.</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>
                        <div>SET: {</div>
                        <div><span style="white-space:pre-wrap">  </span>ID:
                          3</div>
                        <div><span style="white-space:pre-wrap">  </span>TARGETS:
                          {</div>
                        <div><span style="white-space:pre-wrap">          </span>DEST:
                          {</div>
                        <div><span style="white-space:pre-wrap">                  </span>URI:

                          <a moz-do-not-send="true">sip:media22-test.internal:5060</a></div>
                        <div><span style="white-space:pre-wrap">                  </span>FLAGS:

                          AP</div>
                        <div><span style="white-space:pre-wrap">                  </span>PRIORITY:

                          0</div>
                        <div><span style="white-space:pre-wrap">          </span>}</div>
                        <div><span style="white-space:pre-wrap">          </span>DEST:
                          {</div>
                        <div><span style="white-space:pre-wrap">                  </span>URI:

                          <a moz-do-not-send="true">sip:media21-test.internal:5060</a></div>
                        <div><span style="white-space:pre-wrap">                  </span>FLAGS:

                          AP</div>
                        <div><span style="white-space:pre-wrap">                  </span>PRIORITY:

                          0</div>
                        <div><span style="white-space:pre-wrap">          </span>}</div>
                        <div><span style="white-space:pre-wrap">  </span>}</div>
                        <div>}</div>
                      </div>
                      <div><br>
                      </div>
                      <div>Thanks</div>
                      <div>Alessio</div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Oct 27, 2015 at
                        5:33 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 bgcolor="#FFFFFF" text="#000000"> Hello,<br>
                            <br>
                            it looks like sock_avp parameter has to be
                            set -- it is there before 4.3.0 release, as
                            I could spot in 'git blame' for
                            dispatcher.c:768.<br>
                            <br>
                            Not sure is really needed for failover, I
                            will check its usage when I get first
                            chance.<br>
                            <br>
                            <a moz-do-not-send="true"
href="http://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.p.sock_avp"
                              target="_blank">http://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.p.sock_avp</a><br>
                            <br>
                            Cheers,<br>
                            DAniel
                            <div>
                              <div><br>
                                <br>
                                <div>On 26/10/15 17:00, Alessio Casco
                                  wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">
                                    <div class="gmail_quote"><br>
                                      <div dir="ltr">Hello!
                                        <div><br>
                                        </div>
                                        <div>We noticed today an issue
                                          with the kamailio
                                          loadbalancing.</div>
                                        <div><br>
                                        </div>
                                        <div>Basically kamailio is not
                                          considering if an host is up
                                          or not, backends are set
                                          always as "FLAGS: AP" even if
                                          the host is down.</div>
                                        <div><br>
                                        </div>
                                        <div>I see this when the proxy
                                          starts :</div>
                                        <div><br>
                                        </div>
                                        <div>ERROR: dispatcher
                                          [dispatcher.c:768]:
                                          ds_warn_fixup(): failover
                                          functions used, but required
                                          AVP parameters are NULL --
                                          feature disabled<br>
                                        </div>
                                        <div><br>
                                        </div>
                                        <div>These the parameters I have
                                          set:</div>
                                        <div>
                                          <div><br>
                                          </div>
                                          <div>
                                            <div># ----- dispatcher
                                              params -----</div>
                                            <div>modparam("dispatcher",
                                              "list_file",
                                              "/etc/kamailio/dispatcher.list")</div>
                                            <div>modparam("dispatcher",
                                              "dst_avp", "$avp(dsdst)")</div>
                                            <div>modparam("dispatcher",
                                              "grp_avp", "$avp(dsgrp)")</div>
                                            <div>modparam("dispatcher",
                                              "cnt_avp", "$avp(dscnt)")</div>
                                            <div>modparam("dispatcher",
                                              "ds_ping_method",
                                              "OPTIONS")</div>
                                            <div>modparam("dispatcher",
                                              "ds_ping_reply_codes",
                                              "class=2;class=3;code=404")</div>
                                            <div>modparam("dispatcher",
                                              "ds_ping_from", "<a
                                                moz-do-not-send="true"><a class="moz-txt-link-freetext" href="sip:proxy@sip.nexmo.com">sip:proxy@sip.nexmo.com</a></a>")</div>
                                            <div>modparam("dispatcher",
                                              "ds_ping_interval", 20)</div>
                                            <div>modparam("dispatcher",
                                              "ds_probing_threshold", 1)</div>
                                            <div>modparam("dispatcher",
                                              "ds_probing_mode", 1)</div>
                                            <div>modparam("dispatcher",
                                              "ds_hash_size", 10)</div>
                                            <div>modparam("dispatcher",
                                              "ds_hash_expire", 3600)</div>
                                            <div>modparam("dispatcher",
                                              "ds_hash_initexpire", 60)</div>
                                            <div>modparam("dispatcher",
                                              "ds_hash_check_interval",
                                              10)</div>
                                            <div>modparam("dispatcher",
                                              "use_default", 0)</div>
                                            <div>modparam("dispatcher",
                                              "attrs_pvname",
                                              "$avp(carrierattr)")</div>
                                            <div>modparam("dispatcher",
                                              "setid_pvname",
                                              "$avp(carriergroup)")</div>
                                            <div>modparam("dispatcher",
                                              "flags", 2)</div>
                                          </div>
                                        </div>
                                        <div><br>
                                        </div>
                                        <div>I use 4.3.3, I think this
                                          issue started after upgrading
                                          from 4.3.1 but I can't say for
                                          sure.</div>
                                        <div><br>
                                        </div>
                                        <div>Can someone please give us
                                          some advices on this?</div>
                                        <div><br>
                                        </div>
                                        <div>Thanks</div>
                                        <span><font color="#888888">
                                            <div>Alessio</div>
                                          </font></span></div>
                                    </div>
                                    <br>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
                              <span><font color="#888888"> </font></span></blockquote>
                            <span><font color="#888888"> <br>
                                <pre cols="72">-- 
Daniel-Constantin Mierla
<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/miconda</a>
Book: SIP Routing With Kamailio - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - <a moz-do-not-send="true" href="http://asipto.com/kat" target="_blank">http://asipto.com/kat</a></pre>
                              </font></span></div>
                          <br>
_______________________________________________<br>
                          SIP Express Router (SER) and Kamailio
                          (OpenSER) - sr-users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:sr-users@lists.sip-router.org"
                            target="_blank">sr-users@lists.sip-router.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                            rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                  </blockquote>
                  <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<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/miconda</a>
Book: SIP Routing With Kamailio - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - <a moz-do-not-send="true" href="http://asipto.com/kat" target="_blank">http://asipto.com/kat</a></pre>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - <a class="moz-txt-link-freetext" href="http://asipto.com/kat">http://asipto.com/kat</a></pre>
  </body>
</html>