<div dir="ltr"><div>Here is the result of debug, It is saying "ds_mark_dst: mode [2] grp [1] dst [sip:xxx.xxx.xxx.xxx:5071]" but not doing it, i can still see status is "Active" <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'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 ===> 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=<i:274><br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011id=<10><br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011val_int=<1><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=<i:273><br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011id=<9><br>Sep 16 22:59:24 Opensips_Server ../sbin/opensips[32274]: INFO:avpops:ops_print_avp: #011#011#011val_int=<1><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"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></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? "F" or do i need something else? If i
manually shutdown FS1 then it is going inside failure route and
saying "No more gateways in route set" but i have FS2 active
state and if i call again next call works.. do i need to set
some like ( !ds_select_dst("1", "4", "F")) in failure_route ? <br>
<br>
route[to_dispatcher] {<br>
# Dispatch to FS<br>
if ( !ds_select_dst("1", "4", "F")) {<br>
send_reply("500","Unable to dispatch call to
Freeswitch");<br>
exit;<br>
...<br>
...<br>
<br>
<br>
failure_route[dispatcher_rollover] {<br>
xlog("Inside dispatcher failure route\n");<br>
if (t_was_cancelled()) {<br>
exit;<br>
}<br>
<br>
ds_mark_dst("p");<br>
if(!ds_next_dst()) {<br>
xlog("L_ERR", "R-DISPATCHER-ROLLOVER:$ci No more
gateways in route set\n");<br>
t_reply("503", "Out of gateways");<br>
exit;<br>
}<br>
<br>
xlog("L_INFO", "R-DISPATCHER-ROLLOVER:$ci Attempting
relay to new gateway: $rd:$rp\n");<br>
t_on_failure("dispatcher_rollover");<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"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></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
"ds_mark_dst" before selecting a new destination via
"ds_next_dst". 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'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 "dispatcher.so"<br>
modparam("dispatcher", "dst_avp",
"$avp(i:271)")<br>
modparam("dispatcher", "attrs_avp",
"$avp(i:272)")<br>
modparam("dispatcher", "grp_avp",
"$avp(i:273)")<br>
modparam("dispatcher", "cnt_avp",
"$avp(i:274)")<br>
modparam("dispatcher", "ds_ping_interval", 5)<br>
modparam("dispatcher",
"ds_probing_threshhold", 10)<br>
modparam("dispatcher", "ds_probing_mode", 1)<br>
modparam("dispatcher", "options_reply_codes",
"501, 403, 200")<br>
modparam("dispatcher", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")<br>
<br>
<br>
route[to_dispatcher] {<br>
# Dispatch to FS<br>
if ( !ds_select_dst("1", "4", "F")) {<br>
send_reply("500","Unable to
dispatch call to Freeswitch");<br>
exit;<br>
} else {<br>
xlog("L_WARN", "dispatcher: Attempting
to dispatch call to $du\n");<br>
}<br>
t_on_failure("dispatcher_rollover");<br>
route(relay);<br>
}<br>
<br>
failure_route[dispatcher_rollover] {<br>
xlog("Inside dispatcher failure
route\n");<br>
if (t_was_cancelled()) {<br>
exit;<br>
}<br>
<br>
if(!ds_next_dst()) {<br>
xlog("L_ERR",
"R-DISPATCHER-ROLLOVER:$ci No more gateways in
route set\n");<br>
t_reply("503", "Out of
gateways");<br>
exit;<br>
}<br>
ds_mark_dst("p");<br>
xlog("L_INFO",
"R-DISPATCHER-ROLLOVER:$ci Attempting relay to
new gateway: $rd:$rp\n");<br>
t_on_failure("dispatcher_rollover");<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>