<div dir="ltr"><div>Here is the result of debug, It is saying &quot;ds_mark_dst: mode [2] grp [1] dst [sip:xxx.xxx.xxx.xxx:5071]&quot;   but not doing it, i can still see status is &quot;Active&quot; <br><br></div>One more thing let me tell you, I am running both FS1 and FS2 on same box to testing dispatcher so they are running on 5061 and 5071, it shouldn&#39;t be a problem right? <br><br>PARTITION:: default<br>        SET:: 1<br>                URI:: sip:<a href="http://example.com:5061">example.com:5061</a> state=Active<br>                URI:: sip:<a href="http://example.com:5071">example.com:5071</a> state=Active<br><br><div><br>Sep 16 22:59:13 Opensips_Server ../sbin/opensips[32272]: non loose-route section<br>Sep 16 22:59:19 Opensips_Server ../sbin/opensips[32272]: Sending call to ===&gt; Freeswitch<br>Sep 16 22:59:19 Opensips_Server ../sbin/opensips[32272]: dispatcher: Attempting to dispatch call to sip:182.xx.xxx.xxx:5071<br>Sep 16 22:59:19 Opensips_Server ../sbin/opensips[32272]: X-customer: <a href="mailto:2002@sip.example.com">2002@sip.example.com</a><br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: Inside dispatcher failure route<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: DBG:dispatcher:ds_set_state: no event sent<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: DBG:dispatcher:ds_mark_dst: mode [2] grp [1] dst [sip:xxx.xxx.xxx.xxx:5071]<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: p=0x7f4e447c65d0, flags=0x0000<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011name=&lt;i:274&gt;<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011id=&lt;10&gt;<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011val_int=&lt;1&gt;<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: p=0x7f4e447d7310, flags=0x0000<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011name=&lt;i:273&gt;<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011id=&lt;9&gt;<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011val_int=&lt;1&gt;<br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: R-DISPATCHER-ROLLOVER:LhjAoH_IlGtwfeceul5JjA..-S No more gateways in route set<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 16, 2014 at 12:23 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div><tt>Hi,<br>
        <br>
        Use debug=4 when doing the ds_next_dst() - see the setdebug()
        function :<br>
           
        <a href="http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc47" target="_blank">http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc47</a><br>
        <br>
        Also try an avp_print() after ds_select_dst() to see what data
        is kept into transaction.<br>
        <br>
        Regards,<br>
      </tt><span class="">
      <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre></span><div><div class="h5">
      On 16.09.2014 18:18, Satish Patel wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Thanks for point out but still its not working,
        does my flags looks good? &quot;F&quot; or do i need something else?  If i
        manually shutdown FS1 then it is going inside failure route and
        saying &quot;No more gateways in route set&quot; but i have FS2 active
        state and if i call again next call works..  do i need to set
        some like ( !ds_select_dst(&quot;1&quot;, &quot;4&quot;, &quot;F&quot;))  in failure_route ? <br>
        <br>
        route[to_dispatcher] {<br>
                # Dispatch to FS<br>
                if ( !ds_select_dst(&quot;1&quot;, &quot;4&quot;, &quot;F&quot;)) {<br>
                        send_reply(&quot;500&quot;,&quot;Unable to dispatch call to
        Freeswitch&quot;);<br>
                        exit;<br>
        ...<br>
        ...<br>
        <br>
        <br>
        failure_route[dispatcher_rollover] {<br>
                xlog(&quot;Inside dispatcher failure route\n&quot;);<br>
                if (t_was_cancelled()) {<br>
                        exit;<br>
                }<br>
               <br>
                ds_mark_dst(&quot;p&quot;);<br>
                if(!ds_next_dst()) {<br>
                        xlog(&quot;L_ERR&quot;, &quot;R-DISPATCHER-ROLLOVER:$ci No more
        gateways in route set\n&quot;);<br>
                        t_reply(&quot;503&quot;, &quot;Out of gateways&quot;);<br>
                        exit;<br>
                }<br>
        <br>
                xlog(&quot;L_INFO&quot;, &quot;R-DISPATCHER-ROLLOVER:$ci Attempting
        relay to new gateway: $rd:$rp\n&quot;);<br>
                t_on_failure(&quot;dispatcher_rollover&quot;);<br>
                t_relay();<br>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Sep 16, 2014 at 3:16 AM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div><tt>Hi,<br>
                  <br>
                  your logic in failure route is broken - do the
                  &quot;ds_mark_dst&quot; before selecting a new destination via
                  &quot;ds_next_dst&quot;. Firs mark the used one as probing and
                  then use the next one.<br>
                  <br>
                  Regards,<br>
                </tt>
                <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                <div>
                  <div> On 16.09.2014 07:59, Satish Patel
                    wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">
                      <div>following is my config,  I have two
                        Freeswitch, if i stop one of freeswitch and call
                        it won&#39;t failover itself. but if again i call if
                        send call to other FS and if again i call it
                        send to failed one but not auto failover..  <br>
                        <br>
                      </div>
                      But after my prob detect it is dead then it change
                      status from Active to Probing but that detection
                      time is (10 to 30 second around), mean time it
                      should failover call to other freeswitch right? 
                      we have 1000 call per second and 10/30 second if
                      big :( <br>
                      <div>
                        <div><br>
                          #### Dispatcher<br>
                          loadmodule &quot;dispatcher.so&quot;<br>
                          modparam(&quot;dispatcher&quot;, &quot;dst_avp&quot;,
                          &quot;$avp(i:271)&quot;)<br>
                          modparam(&quot;dispatcher&quot;, &quot;attrs_avp&quot;,
                          &quot;$avp(i:272)&quot;)<br>
                          modparam(&quot;dispatcher&quot;, &quot;grp_avp&quot;,
                          &quot;$avp(i:273)&quot;)<br>
                          modparam(&quot;dispatcher&quot;, &quot;cnt_avp&quot;,
                          &quot;$avp(i:274)&quot;)<br>
                          modparam(&quot;dispatcher&quot;, &quot;ds_ping_interval&quot;, 5)<br>
                          modparam(&quot;dispatcher&quot;,
                          &quot;ds_probing_threshhold&quot;, 10)<br>
                          modparam(&quot;dispatcher&quot;, &quot;ds_probing_mode&quot;, 1)<br>
                          modparam(&quot;dispatcher&quot;, &quot;options_reply_codes&quot;,
                          &quot;501, 403, 200&quot;)<br>
                          modparam(&quot;dispatcher&quot;, &quot;db_url&quot;,
                          &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>
                          <br>
                          <br>
                          route[to_dispatcher] {<br>
                                  # Dispatch to FS<br>
                                  if ( !ds_select_dst(&quot;1&quot;, &quot;4&quot;, &quot;F&quot;)) {<br>
                                          send_reply(&quot;500&quot;,&quot;Unable to
                          dispatch call to Freeswitch&quot;);<br>
                                          exit;<br>
                                  } else {<br>
                                  xlog(&quot;L_WARN&quot;, &quot;dispatcher: Attempting
                          to dispatch call to $du\n&quot;);<br>
                                  }<br>
                                  t_on_failure(&quot;dispatcher_rollover&quot;);<br>
                                  route(relay);<br>
                          }<br>
                          <br>
                          failure_route[dispatcher_rollover] {<br>
                                  xlog(&quot;Inside dispatcher failure
                          route\n&quot;);<br>
                                  if (t_was_cancelled()) {<br>
                                          exit;<br>
                                  }<br>
                                 <br>
                                  if(!ds_next_dst()) {<br>
                                          xlog(&quot;L_ERR&quot;,
                          &quot;R-DISPATCHER-ROLLOVER:$ci No more gateways in
                          route set\n&quot;);<br>
                                          t_reply(&quot;503&quot;, &quot;Out of
                          gateways&quot;);<br>
                                          exit;<br>
                                  }<br>
                                  ds_mark_dst(&quot;p&quot;);<br>
                                  xlog(&quot;L_INFO&quot;,
                          &quot;R-DISPATCHER-ROLLOVER:$ci Attempting relay to
                          new gateway: $rd:$rp\n&quot;);<br>
                                  t_on_failure(&quot;dispatcher_rollover&quot;);<br>
                                  route(relay);<br>
                          }<br>
                          <br>
                        </div>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>