<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    can you check the state of the gateways when you get this issue?
    Via: kamctl mi ds_list<br>
    <br>
    If the REGISTERs are not replied, then you mark them as inactive.<br>
    <br>
    Hash 0 means the the first entry in the group is used, as computed
    using the algorithm.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 18/12/14 16:10, José Seabra wrote:<br>
    </div>
    <blockquote
cite="mid:CAEVZRWs1pJCyYMHiRn=Rj9-u5heH6runb3ggZgQ0aqts7rBaYA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Carsten<br>
        <br>
        <br>
        >- Do you have the Dispatcher Activity detection turned on?<br>
        >Can you send me your config, so i can verify a few things?<br>
        My dispatcher configuration is:<br>
        <br>
        # ----- dispatcher params -----<br>
        modparam("dispatcher", "table_name", "dispatcher")<br>
        modparam("dispatcher", "force_dst", 2)<br>
        modparam("dispatcher", "flags", 3)<br>
        modparam("dispatcher", "db_url", DBURL)<br>
        modparam("dispatcher", "dst_avp", "$avp(s:dst)")<br>
        modparam("dispatcher", "cnt_avp", "$avp(s:dsp_uri_count)")<br>
        modparam("dispatcher", "grp_avp", "$avp(s:dsp_uri_grp)")<br>
        modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>
        modparam("dispatcher", "ds_ping_from", "<a
          moz-do-not-send="true"
          href="http://sip:sipcheck@10.0.20.102:5062">sip:sipcheck@10.0.20.102:5062</a>")<br>
        modparam("dispatcher", "ds_ping_interval", 10)<br>
        modparam("dispatcher", "ds_probing_threshhold", 3)<br>
        modparam("dispatcher", "ds_probing_mode", 2)<br>
        <br>
        <br>
        >Do you do something like "ds_mark_dst()" in your failure
        route?
        <div><br>
          Yes, I'm using ds_mark_dst inside of failure route, but the
          "REGISTER" is not entering in failure route in any case,
          because when "REGISTER" gets the function ds_select_dst, this
          function returns false and my kamailio sends a statless reply
          to phone and drops the message.</div>
        <div><br>
        </div>
        <div>I did a test that was comment "ds_mark_dst("ip");" in
          failure route and even with this I still having the same
          issue.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>route[HANDLE_REGISTER]<br>
          {<br>
          ....<br>
             t_set_fr(0,2000);<br>
             t_on_failure("PRXFAILURE");<br>
          <br>
             if(!ds_select_dst("9", "4"))<br>
             {<br>
                 xlog("L_ERR", "Failed to select proxy - R=$ru
          ID=$ci\n");<br>
                 sl_send_reply("503", "No proxy available, try again
          later");<br>
                 exit;<br>
             }<br>
          <br>
             ...<br>
          <br>
             route(RELAY);<br>
          <br>
          }<br>
          <br>
          <br>
          failure_route[PRXFAILURE] {<br>
             if(is_method("REGISTER") && (t_check_status("500")
          || t_branch_timeout() || !t_branch_replied()))<br>
             {<br>
                 $var(cache_user) = $tU + "@" + $td;<br>
                 $sht(prxcache=>$var(cache_user))=$null;<br>
                 ds_mark_dst("ip");<br>
                 if(ds_next_dst())<br>
                 { <br>
                   #again set local timeout for reply<br>
                   t_set_fr(0,2000);<br>
                   t_on_failure("PRXFAILURE");<br>
                   xlog("L_INFO", "PRX FAILURE -REGISTER New dest $du
          ID=$ci\n");<br>
                   $sht(tmpcache=>$var(cache_user))=$du;<br>
                   route(RELAY);<br>
                   exit;<br>
                  }<br>
                  else<br>
                  {<br>
                    #last available node failed to reply, no other
          destinations available<br>
                    send_reply("404", "No destination");<br>
                    exit;<br>
          <br>
          <br>
                   }<br>
          <br>
              }</div>
        <div>}</div>
        <div><br>
        </div>
        <div>BR </div>
        <div>José Seabra</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2014-12-18 14:43 GMT+00:00 Carsten Bock
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a>></span>:
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
            <br>
            quick questions:<br>
            - Do you have the Dispatcher Activity detection turned on?<br>
            - Do you do something like "ds_mark_dst()" in your failure
            route?<br>
            - Can you send me your config, so i can verify a few things?<br>
            <br>
            Thanks,<br>
            Carsten<br>
            <div>
              <div class="h5"><br>
                <br>
                <br>
                2014-12-18 15:14 GMT+01:00 José Seabra <<a
                  moz-do-not-send="true"
                  href="mailto:joseseabra4@gmail.com">joseseabra4@gmail.com</a>>:<br>
                > Hello Daniel,<br>
                > Thank you for your reply,<br>
                ><br>
                > Please check out the attachment with kamailio logs
                in mode debug 3, i didn't<br>
                > find any errors, the only thingh that is confusing
                me is this line:<br>
                > /usr/local/sbin/kamailio[13690]: DEBUG: dispatcher
                [dispatch.c:1745]:<br>
                > ds_select_dst_limit(): alg hash [0]<br>
                ><br>
                > I don't know if this "ds_select_dst_limit(): alg
                hash [0]" is related with<br>
                > algorithm parameter in function ds_select_dst, but,
                if yes i cannot<br>
                > understand why it is 0 because I'm using algorithm
                4.<br>
                ><br>
                > BR<br>
                > José Seabra<br>
                ><br>
                ><br>
                > 2014-12-18 11:35 GMT+00:00 Daniel-Constantin Mierla
                <<a moz-do-not-send="true"
                  href="mailto:miconda@gmail.com">miconda@gmail.com</a>>:<br>
                >><br>
                >> Hello,<br>
                >><br>
                >> I asked in the first email - do you get error
                messages in syslog? If not,<br>
                >> then you have to run with debug=3 and look at
                the log messages to see if you<br>
                >> get further hints.<br>
                >><br>
                >> Cheers,<br>
                >> Daniel<br>
                >><br>
                >><br>
                >> On 18/12/14 12:29, José Seabra wrote:<br>
                >><br>
                >> Hello Daniel,<br>
                >> Do you need more information from my kamailio
                settup, in order to try<br>
                >> understand why this issue happens?<br>
                >> Thank you<br>
                >> BR<br>
                >> José Seabra<br>
                >><br>
                >><br>
                >> 2014-12-16 12:16 GMT+00:00 José Seabra <<a
                  moz-do-not-send="true"
                  href="mailto:joseseabra4@gmail.com">joseseabra4@gmail.com</a>>:<br>
                >>><br>
                >>> Update:<br>
                >>> My last email has the wrong  example, the
                correct code is:<br>
                >>><br>
                >>> if(!ds_select_dst("9", "4"))<br>
                >>> {<br>
                >>> xlog("L_ERR", "Failed to select proxy -
                R=$ru ID=$ci\n");<br>
                >>> sl_send_reply("503", "No proxy available,
                try again later");<br>
                >>> exit;<br>
                >>> }<br>
                >>><br>
                >>> I'm using algorithm 4.<br>
                >>><br>
                >>> 2014-12-16 12:14 GMT+00:00 José Seabra <<a
                  moz-do-not-send="true"
                  href="mailto:joseseabra4@gmail.com">joseseabra4@gmail.com</a>>:<br>
                >>>><br>
                >>>> Hello Daniel,<br>
                >>>><br>
                >>>> Yes it enter inside a condition.<br>
                >>>><br>
                >>>> my code is:<br>
                >>>><br>
                >>>> if(!ds_select_dst("9", "0"))<br>
                >>>> {<br>
                >>>> xlog("L_ERR", "Failed to select proxy -
                R=$ru ID=$ci\n");<br>
                >>>> sl_send_reply("503", "No proxy
                available, try again later");<br>
                >>>> exit;<br>
                >>>> }<br>
                >>>> and all sip registrers sent receives a
                sip reply 503 "No proxy<br>
                >>>> available, try again later"<br>
                >>>><br>
                >>>><br>
                >>>> BR<br>
                >>>> José Seabra<br>
                >>>><br>
                >>>> 2014-12-16 12:06 GMT+00:00
                Daniel-Constantin Mierla <<a moz-do-not-send="true"
                  href="mailto:miconda@gmail.com">miconda@gmail.com</a>>:<br>
                >>>>><br>
                >>>>> Hello,<br>
                >>>>><br>
                >>>>> what do you mean starts returning
                null?<br>
                >>>>><br>
                >>>>> Does it enter inside a condition
                like:<br>
                >>>>><br>
                >>>>> if(!ds_select_dst(...))<br>
                >>>>><br>
                >>>>> Are there any error messages in
                syslog?<br>
                >>>>><br>
                >>>>> Daniel<br>
                >>>>><br>
                >>>>><br>
                >>>>> On 16/12/14 12:51, José Seabra
                wrote:<br>
                >>>>><br>
                >>>>> Hello there,<br>
                >>>>><br>
                >>>>> I'm doing stress testing against
                kamailio (sip load balancer role)<br>
                >>>>> sending sip registrar, my stress
                test software is sending 50 registrations<br>
                >>>>> per second, after 30 seconds and
                1000 registers processed the function<br>
                >>>>> ds_select_dst (I'm using algorithm
                4) returns null for all registers sent<br>
                >>>>> from my software, and all registrar
                sip servers are available and in active<br>
                >>>>> mode, if I reduce the software to 
                send 20 registrar's per second, the issue<br>
                >>>>> only happens after 60 seconds and
                kamailio (sip load balancer role)  process<br>
                >>>>> 4000 registrers, after this,
                function ds_select_dst starts returning null<br>
                >>>>><br>
                >>>>><br>
                >>>>> Anyone has any idea why it is
                happening?<br>
                >>>>> My kamailio version is 4.2<br>
                >>>>><br>
                >>>>> Best Regards<br>
                >>>>> --<br>
                >>>>> Cumprimentos<br>
                >>>>> José Seabra<br>
                >>>>><br>
                >>>>><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"
                  target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                >>>>><br>
                >>>>><br>
                >>>>> --<br>
                >>>>> Daniel-Constantin Mierla<br>
                >>>>> <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><br>
                >>>>><br>
                >>>>><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"
                  target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                >>>>><br>
                >>>><br>
                >>>><br>
                >>>> --<br>
                >>>> Cumprimentos<br>
                >>>> José Seabra<br>
                >>><br>
                >>><br>
                >>><br>
                >>> --<br>
                >>> Cumprimentos<br>
                >>> José Seabra<br>
                >><br>
                >><br>
                >><br>
                >> --<br>
                >> Cumprimentos<br>
                >> José Seabra<br>
                >><br>
                >><br>
                >> --<br>
                >> Daniel-Constantin Mierla<br>
                >> <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><br>
                ><br>
                ><br>
                ><br>
                > --<br>
                > Cumprimentos<br>
                > José Seabra<br>
                ><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"
                  target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                ><br>
                <br>
                <br>
                <br>
                --<br>
              </div>
            </div>
            Carsten Bock<br>
            CEO (Geschäftsführer)<br>
            <br>
            ng-voice GmbH<br>
            Schomburgstr. 80<br>
            D-22767 Hamburg / Germany<br>
            <br>
            <a moz-do-not-send="true" href="http://www.ng-voice.com"
              target="_blank">http://www.ng-voice.com</a><br>
            mailto:<a moz-do-not-send="true"
              href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a><br>
            <br>
            Office <a moz-do-not-send="true"
              href="tel:%2B49%2040%205247593-0" value="+494052475930">+49
              40 5247593-0</a><br>
            Fax <a moz-do-not-send="true"
              href="tel:%2B49%2040%205247593-99" value="+4940524759399">+49
              40 5247593-99</a><br>
            <br>
            Sitz der Gesellschaft: Hamburg<br>
            Registergericht: Amtsgericht Hamburg, HRB 120189<br>
            Geschäftsführer: Carsten Bock<br>
            Ust-ID: DE279344284<br>
            <br>
            Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
            <a moz-do-not-send="true"
              href="http://www.ng-voice.com/imprint/" target="_blank">http://www.ng-voice.com/imprint/</a><br>
            <div class="HOEnZb">
              <div class="h5"><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"
                  target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">Cumprimentos
          <div>José Seabra</div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.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-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></pre>
  </body>
</html>