Dial failover on different dialer is possible?

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Dial failover on different dialer is possible?

Postby airflux » Mon Jul 24, 2017 12:42 pm

Hi guys,
I'm working on a new cluster with 4 dialers (plus 1db and 2www), first 2 dialers (d1, d2) will use 2 PRI E1 each, last 2 dialers will be an agent server with no carriers (d3) and a pure dialer with no agents (d4). We can use voip carriers only if there are no PRI channel available, this is the reason for this strange setup. Load balance, server priority and max trunks options will be used for our LCR schema, giving priority to d1 > d2 > d4.

I need some help for manual and 3ways calls, they are are not balanced, they are dialed on the current agent server.

The point is the agi script call_log.agi, executed before the dial (call_log insert @ stage START) and at the hangup (call_log update and more @ stage END), but what appens if I start using IAX2 trunks between dialers to find an available dialer respecting our priority?

For example, with the following carrier on d3 for manual calls only (pseudo-code):
1) dial using iax2-trunk-d1-PRI, if fails CONGESTION
2) if dial #1 is congested, dial using iax2-trunk-d2-PRI, if fails CONGESTION
3) if dial #2 is congested, dial using iax2-trunk-d3-VOIP, and this will work because there are no limits on channels number like PRI

Is a must to exec call_log.agi on the server that are trying to make the call, but if dial fails because congestion due to no channel available and I need to change dialer, I must cancel this call_log.agi event? For example triggering the END stage (like hangup) after every fail using a custom agi script?

It's a bad idea? There are better best pratice for that?
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm

Re: Dial failover on different dialer is possible?

Postby mflorell » Mon Jul 24, 2017 3:16 pm

We did configure a similar setup for a client years ago, it did work, but you need to remember to make sure that only one of the dialers is call_log-ing the call, and not both. Only the first dialer should log the call, and the second step(that goes through another dialer) needs to be placed through a no-log context so neither the dialing nor the hangup of the dial is logged in any way.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Dial failover on different dialer is possible?

Postby airflux » Tue Jul 25, 2017 3:23 am

Hi Matt, thanks for reply. Just another question.
Avoiding to generate more auto calls than the max trunks configuration, I should run call_log on the current agent server also when the dial goes out thru another server (in a no_log context, as you said), or call_log must be called on the server where the dial goes out? In other words, is call_log.agi that add "+1" to the active trunks number for a specific server adding an "start" entry in call_log table, or is something else?
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm

Re: Dial failover on different dialer is possible?

Postby mflorell » Tue Jul 25, 2017 7:31 am

You must choose which server the call will be logged on, and that includes the auto-calls table. We've always used the originating server(the one with the agent on it). But, it can be logged on only one server.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Dial failover on different dialer is possible?

Postby airflux » Tue Aug 01, 2017 5:09 am

Hi Matt, hi guys.
I've tried a lot of configuration with strange behaviors due to my errors :)
Now manual calls with lb/failover works, except for the agent screen where the calls status remains IN CALL when should be DEAD (the agent listen the customer hangup sound), realtime report shows DEAD correctly.

I need some help, my configuration is:
4 dialers: d1-d4
4 carriers for manual calls d1_man-d4_man (dial prefix 9997)
4 carriers for auto calls: d1_auto-d4_auto

ei. d4_man carrier
exten => _9997XXXX.,1,NoOp(MAN)
same => n,AGI(agi://127.0.0.1:4577/call_log)
same => n,Dial(${TRUNKd1}/9900${EXTEN:4},,To)
same => n,Dial(${TRUNKd2}/9900${EXTEN:4},,To)
same => n,Dial(${TRUNKd3}/9900${EXTEN:4},,To)
same => n,Dial(Local/9900${EXTEN:4},,To) ;d4
same => n,Congestion()

Under [default] I've added
exten => _9900XXX.,Goto(loopback-no-log,${EXTEN},1)
same => Hangup()

Under [loopback-no-log] I've added
exten => _9900XXX.,Dial("local trunk",,To)
same => Hangup()

So in this way when Dial TRUNKd1-2-3 fails, there are no extra call_log, just 1 in the agent server.

Some advice? :)
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 87 guests