<br><br><div class="gmail_quote">On Thu, Apr 1, 2010 at 10:26 AM, Brett Nemeroff <span dir="ltr"><<a href="mailto:brett@nemeroff.com">brett@nemeroff.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Where is your failure route? :)<br>
-Brett<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>I intentionally chose to not include it, along with the other 200 lines of config, for simplicity, but you're right, given this is a failure, I clearly should've, duh :)<br>
<br>failure_route[2] {<br> if (t_was_cancelled()) {<br> xlog( "L_NOTICE", "[$Tf] FR: transaction cancelled - exiting\n" );<br> exit;<br> }<br><br> # If fr_timer expires t_check_status("408") is true, although $rs is <null><br>
if( t_check_status("408") ){<br> xlog( "L_NOTICE", "[$Tf] FR: $ci -- TIMEOUT for Gateway $rd\n" );<br> } else {<br> xlog( "L_NOTICE", "[$Tf] FR: $ci -- $rs reason $rr\n" );<br>
}<br><br> # 403 -- typically ISDN network says 'not a valid number' etc..<br> if( t_check_status("403") ){<br> xlog("L_WARN", "[$Tf] FR: $ci -- SIP-$rs Forbidden -> ISDN Cause Code 1\n" );<br>
return;<br> }<br><br> if( ds_next_domain() ){<br> xlog( "L_NOTICE", "[$Tf] FR: $ci Next gateway $fU -> $tU via $rd \n" );<br><br> t_on_failure("2");<br>
<br> if( !t_relay() ){<br> xlog( "L_WARN", "[$Tf] FR: $ci -- ERROR - Cannot t_relay() -- $fU -> $tU via $rd\n" );<br> return;<br> }<br>
return;<br> } else {<br> xlog( "L_WARN", "[$Tf] FR: $ci No more gateways -> 503.\n" );<br> t_reply("503", "Service unavailable -- no more gateways" );<br>
return;<br> }<br><br> }<br><br> - Jock<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
On Thu, Apr 1, 2010 at 11:20 AM, Jock McKechnie<br>
<<a href="mailto:jock.mckechnie@gmail.com">jock.mckechnie@gmail.com</a>> wrote:<br>
> Greetings all;<br>
><br>
> I'm attempting to set up a fail-over only scenario using dispatcher and am<br>
> encountering some problems. I'm using dispatcher since we're already<br>
> utilising it for load balancing, so it makes sense to reuse the tool, and<br>
> according to the OpenSIPS 1.6 dispatcher module documentation it supports<br>
> fail-over.<br>
><br>
> If the destination server is running, everything works as expected - algo 8<br>
> (which OpenSIPS logs as not found and defaulting to the first entry) pushes<br>
> the call to the first server at all times. However if I block the route to<br>
> 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<br>
> entry...<br>
> Attempting to relay call to <a href="http://sip:+12125551212@192.168.0.99:5060" target="_blank">sip:+12125551212@192.168.0.99:5060</a><br>
> ERROR:core:udp_send: sendto(sock,0xb3b9bd28,1039,0,0xb3ba2cf4,16): Network<br>
> 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<br>
> entry...<br>
> Attempting to relay call to <a href="http://sip:+12125551212@192.168.0.99:5060" target="_blank">sip:+12125551212@192.168.0.99:5060</a><br>
><br>
> This suggests to me that instead of failing over it's simply retrying the<br>
> first entry, which it shouldn't be, and after finding it out for a second<br>
> time (and thus exhausting the two-entry set), gives up.<br>
><br>
> Any thoughts?<br>
><br>
> - JP<br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br>