[OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy
Jock McKechnie
jock.mckechnie at gmail.com
Thu Apr 1 18:20:33 CEST 2010
Greetings all;
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.
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:
/sbin/route add -host 192.168.0.99 reject
Then instead of failing over I get a SIP 477 (Send failed) error.
The chunk of routing looks like so:
xlog("L_WARN", "[$Tf] Found failover, working on set: 1101\n");
if (!ds_select_domain("1101", "8")) {
t_reply("503", "Unable to locate failover set requested");
return;
};
route(1);
};
route[1] {
t_on_failure("2");
xlog("L_WARN", "Attempting to relay call to $ru\n");
if (!t_relay()) {
xlog("L_WARN", "[$Tf] t_relay fail\n");
return;
}
return;
}
The log contains:
[Thu Apr 1 11:14:35 2010] Found failover, working on set: 1101
WARNING:dispatcher:ds_select_dst: algo 8 not implemented - using first
entry...
Attempting to relay call to sip:+12125551212 at 192.168.0.99:5060
ERROR:core:udp_send: sendto(sock,0xb3b9bd28,1039,0,0xb3ba2cf4,16): Network
is unreachable(101)
ERROR:tm:msg_send: udp_send failed
ERROR:tm:t_forward_nonack: sending request failed
[Thu Apr 1 11:14:35 2010] Found failover, working on set: 1101
WARNING:dispatcher:ds_select_dst: algo 8 not implemented - using first
entry...
Attempting to relay call to sip:+12125551212 at 192.168.0.99:5060
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.
Any thoughts?
- JP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100401/a3ef553d/attachment.htm
More information about the Users
mailing list