<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix"><tt>Hi,<br>
<br>
Use debug=4 when doing the ds_next_dst() - see the setdebug()
function :<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc47">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>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 16.09.2014 18:18, Satish Patel wrote:<br>
</div>
<blockquote
cite="mid:CAPgF-fryvKjbE_K5NVzQQ+jAetR5aF_akZsw2EvSxhZqQ6G=Dw@mail.gmail.com"
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
moz-do-not-send="true" 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 moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div class="h5"> On 16.09.2014 07:59, Satish Patel
wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<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 moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</body>
</html>