[OpenSIPS-Users] Failover using dispatcher in opensips 1.11

Gunjan Korlekar gunjan at switch.co
Tue Feb 23 08:29:35 CET 2016


Hello,

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.

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 -

if ( !ds_select_dst("1", "4") ) {
    xlog("L_INFO", "ds_select_dst error");
    send_reply("500","Unable to route");
  }

I have ds_probing_mode set in my config file so it always knows what
destinations are active.

Can you please help in clarifying the following -

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?

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?

What is the default value of 'max_results' in the ds_select_dst() signature
and does it affect failover selection?

Thanks in advance!

-- 
Thanks,
Gunjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160222/3c715b1d/attachment.htm>


More information about the Users mailing list