<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body 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 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>
<div class="moz-cite-prefix">On 23.02.2016 09:29, Gunjan Korlekar
wrote:<br>
</div>
<blockquote
cite="mid:CAGLL2ftPT823tNexmvObyQ1UVh+YdsovDiV1mhst-PhRh=JAKQ@mail.gmail.com"
type="cite">
<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 class="gmail_signature">
<div dir="ltr">Thanks,
<div>Gunjan</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>