TIPS Direct call to remote queue, failover to local queue

JayG30

Member
Joined
Jan 30, 2014
Messages
64
Reaction score
5
What I'm looking to do is take an incoming call, send it to an IVR, if that person pressed 2 (for instance), it goes to a queue on a REMOTE PBX over an IAX trunk, however if it can't get to that queue for whatever reason (IAX trunk down) or nobody answers at the remote queue it would failover to a queue on the local PBX.

What I'm having an issue figuring out is sending the call to the remote queue and allowing it to failover to the local queue.

I thought about directing the call to a misc destination with the remote queue extension #, but with that approach I don't really see a way to handle failover.

Alternatively I could recreate the remote queue on the local PBX (mirrored) so that if the call comes in it goes to this "local remote queue" with the required extensions on the remote system, but if those extensions aren't available it would failover to the local queue.

Anyone have any other ideas?
 

rchalk

Active Member
Joined
Feb 19, 2010
Messages
403
Reaction score
55
Can you create a ring group which includes the numbers for both queues, and set the sequence to "first available"? Then if the first queue is not available, it should ring to the second..

I'm not sure this will work the way you intend, but it' worth a try...
 

JayG30

Member
Joined
Jan 30, 2014
Messages
64
Reaction score
5
So I gave this a quick try using a ring group. Doesn't seem to work. Set to first available and both queues listed in extensions as follows;
2000#
1000#
(2xxx being remote side and the # added per freepbx documentation saying it is necessary for queues).

While the iax trunk is up, it will send the call to the remote PBX queue. When I disabled the trunk however, the ring group did not dial the local queue, it failed without ever entering the queue which I can see in the CDR. Put it first in the list and calls do go to the local queue. So my assumption is even though the trunk is disabled, the local PBX either can't tell or thinks the remote queue is available.

The other problem with this approach is that in the normal situation where the iax trunk is up, it should go to the remote queue and nobody answers, send the call to the local queue. Failover destination for the queue fixes that though, but would have to point to a misc destination or another ring group on the remote PBX. It starts getting messy.

I had an idea though. What if I try dealing with this stuff at the trunk and outbound route level. Right now, if something is dialed that matches the 2xxx dial pattern in the outbound route, it attempts to send that over the iax trunk. Could I create a trunk that loops back into the local pbx and manipulate the dialed number from 2xxx to 1xxx? I know you can have multiple trunks set to try in order from the outbound routes setup page and I know there is a tab for minuplating the dialed number before sending it out the trunk. I've setup the queues so that they are the same minus the 2 or 1 prefix.
 

JayG30

Member
Joined
Jan 30, 2014
Messages
64
Reaction score
5
So, I just tried my idea out and I think it will work!
Here is the setup.

  1. Navigate to Connectivity -> Trunks -> +Add Custom Trunk
  2. Set the "Custom Dial String" to
    Code:
    Local/@OUTNUM$@from-internal
  3. In Dialplan Manipulation Rules you need to specify how you want to change the number you are dialing. So in my case I have set ranges for queues on both boxes. If I'm sending a call to remote queue 2095, the equivalent on the local PBX is 1095. So I would have;
    Code:
    (1) 2 | xxx
  4. Navigate to Connectivity -> Outbound Routes and select the route that uses your IAX/SIP trunk to your remote PBX.
  5. In "Trunk Sequence" add the new custom trunk as the second trunk in the sequence.
If the IAX/SIP trunk is up and working the calls will pass through fine. If it is down it will end up at this new custom trunk that will manipulate the dialed number and dial it as if it was from-internal, putting you in the local queue.

Finally, you will still need a misc destination to first send the call to the remote queue from the IVR. And you will want to set the failover destination for the remote queue to point back to the local queue (again using a misc destination on the remote PBX).


Alternatively, I'm thinking if this gets to complex I might try to talk them into sending the calls to the "operator" queue if the IAX/SIP trunk between PBX's are down for whatever reason. And also consider creating a single queue instead of 2 on both systems, which I could do but that comes with it's own issues, like I think presence of remote extensions doesn't work without extra setup and login for users on the remote PBX to the queue will be more difficult (they can login using the freepbx commercial restapp, but don't think that would work with remote queues).
 

Members online

Forum statistics

Threads
25,824
Messages
167,831
Members
19,249
Latest member
jetest
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top