Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-12 Thread Bogdan-Andrei Iancu
Hi Jock, My approach was to use a common subroute (try_next) to be used from both failure route (if you get a failure at SIP level) and from main route, if relay fails. Of course the t_was_cancelled() needs to be kept in failure route (as it is specific to that type of route) : oute[try_next]

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-02 Thread Jock McKechnie
Greetings Bogdan; Unfortunately there's a minor hitch in the getalong with this suggestion - the failure route utilises two functions that can only be called from a failure_route block (t_was_cancelled() and ds_next_domain()). >From my understanding of what you're suggesting below, I should move

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-02 Thread Bogdan-Andrei Iancu
I think jock case was internal blacklisting (in opensips) of the destination IP. Regards, Bogdan Brett Nemeroff wrote: > Ok, that makes sense actually.. > > so this block: > route[1] { > t_on_failure("2"); > > xlog("L_WARN", "Attempting to relay call to $ru\n"); > > if (!t_relay()) { > xlog(

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-02 Thread Brett Nemeroff
Ok, that makes sense actually.. so this block: 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; } Instead of firing failure_route[2] (since it isn't a SIP failure) it'll hit

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-02 Thread Bogdan-Andrei Iancu
Brett, if t_relay() fails (whatever reason, like transport issues, IP problems, URI problems, etc), it will not end up in failure route! failure route is for SIP failures, not for any kind of failures. Also see the 0x02 flag in t_relay() docs: http://www.opensips.org/html/docs/modules/1.6.x

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-02 Thread Brett Nemeroff
Bogdan, I think the ds_next_doman in the failure route should have been called. On the initial t_relay, the failure route was already armed and should have caught send failures. The top of the failure route catches specific SIP codes, but the bottom half, including the ds_next_domain should have fi

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-02 Thread Bogdan-Andrei Iancu
Hi Jock, I guess the problem is detecting the failure . The failure route catches only SIP failures (like you sent the requests and you get nothing or negative reply); but failure route does not catch sending error (like in your case). So, you should do something like: route[try_next] { h

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-01 Thread Jock McKechnie
On Thu, Apr 1, 2010 at 10:26 AM, Brett Nemeroff wrote: > Where is your failure route? :) > -Brett > > 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 :) failure_route[2] {

Re: [OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-01 Thread Brett Nemeroff
Where is your failure route? :) -Brett On Thu, Apr 1, 2010 at 11:20 AM, Jock McKechnie wrote: > 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,

[OpenSIPS-Users] dispatcher "fail-over" doesn't seem happy

2010-04-01 Thread Jock McKechnie
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