<div dir="ltr">Hi Bogdan,<div><br></div><div>Thanks for the clarification regarding the function! The 'make menuconfig' definitely helps.</div><div><br></div><div>-Gunjan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 23, 2016 at 2:28 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 bgcolor="#FFFFFF" text="#000000">
<tt>Hi Gunjan,<br>
<br>
the ds_select_dst() will just pick the first to be used and
prepares the rest of the available destination (this function does
not do any SIP signaling, it just get the available destinations
from the indicated set). The function returns false only if there
is no available (know to be available) destination in the set.<br>
<br>
To have a model, please use the "make menuconfig" to generate a
load-balancer like script using dispatcher - this will give you a
hint on how dispatcher has to be configured for failover.<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 class="h5">
<div>On 23.02.2016 09:29, Gunjan Korlekar
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I am new to the dispatcher module on opensips 1.11 and was
trying to understand how failover works in the ds_select_dst
function. I tried searching for answers online but I could not
get much clarity.</div>
<div><br>
</div>
<div>So, I have a bunch of destinations in my dispatcher table
and the following piece of code in my route function in the
config file - </div>
<div><br>
</div>
<div>
<div>if ( !ds_select_dst("1", "4") ) {</div>
<div> xlog("L_INFO", "ds_select_dst error");</div>
<div> send_reply("500","Unable to route");</div>
<div> }</div>
</div>
<div><br>
</div>
<div>I have ds_probing_mode set in my config file so it always
knows what destinations are active.</div>
<div><br>
</div>
<div>Can you please help in clarifying the following - </div>
<div><br>
</div>
<div>Will the ds_select_dst() return a 'False' only after it has
tried all the destinations in the dispatcher table or just the
one that gets selected in the round-robin?</div>
<div><br>
</div>
<div>If above is not true and the destination selected by
ds_select_dst turns out to be non reachable, will the above
call return False for the destination that it picks? In such a
case can you guide me as to what I can do so that it selects
the next available destination in the dispatcher list?<br>
</div>
<div><br>
</div>
<div>What is the default value of 'max_results' in the
ds_select_dst() signature and does it affect failover
selection?</div>
<div><br>
</div>
<div>Thanks in advance!</div>
<div>
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">Thanks,
<div>Gunjan</div>
</div>
</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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Thanks,<div>Gunjan</div></div></div>
</div>