Greetings all;<br><br>I'm attempting to set up a fail-over only scenario using dispatcher and am encountering some problems. I'm using dispatcher since we're already utilising it for load balancing, so it makes sense to reuse the tool, and according to the OpenSIPS 1.6 dispatcher module documentation it supports fail-over.<br>
<br>If the destination server is running, everything works as expected - algo 8 (which OpenSIPS logs as not found and defaulting to the first entry) pushes the call to the first server at all times. However if I block the route to the destination server like so:<br>
/sbin/route add -host 192.168.0.99 reject<br>Then instead of failing over I get a SIP 477 (Send failed) error.<br><br>The chunk of routing looks like so:<br><br>xlog("L_WARN", "[$Tf] Found failover, working on set: 1101\n");<br>
if (!ds_select_domain("1101", "8")) {<br> t_reply("503", "Unable to locate failover set requested");<br> return;<br> };<br><br>route(1);<br>};<br><br>route[1] {<br>t_on_failure("2");<br>
<br>xlog("L_WARN", "Attempting to relay call to $ru\n");<br><br>if (!t_relay()) {<br> xlog("L_WARN", "[$Tf] t_relay fail\n");<br> return;<br> }<br>return;<br>}<br><br><br><br>
The log contains:<br>[Thu Apr 1 11:14:35 2010] Found failover, working on set: 1101<br>WARNING:dispatcher:ds_select_dst: algo 8 not implemented - using first entry...<br>Attempting to relay call to <a href="http://sip:+12125551212@192.168.0.99:5060">sip:+12125551212@192.168.0.99:5060</a><br>
ERROR:core:udp_send: sendto(sock,0xb3b9bd28,1039,0,0xb3ba2cf4,16): Network is unreachable(101)<br>ERROR:tm:msg_send: udp_send failed<br>ERROR:tm:t_forward_nonack: sending request failed<br>[Thu Apr 1 11:14:35 2010] Found failover, working on set: 1101<br>
WARNING:dispatcher:ds_select_dst: algo 8 not implemented - using first entry...<br>Attempting to relay call to <a href="http://sip:+12125551212@192.168.0.99:5060">sip:+12125551212@192.168.0.99:5060</a><br><br>This suggests to me that instead of failing over it's simply retrying the first entry, which it shouldn't be, and after finding it out for a second time (and thus exhausting the two-entry set), gives up.<br>
<br>Any thoughts?<br><br> - JP<br>