Queue Forward Based on DID

I’m trying to figure out the best setup for a failover destination in the queue, based on the DID. For example, let’s say I have two DIDs 555-555-5555 and 555-555-1234. Let’s say all operators are busy and both of those DIDs receive a call, I want 5555 to forward to 904-222-2222, and the number ending in 1234 to forward to 904-888-2555. Is this possible, without setting a different queue for every DID we have?

Third party module Dynroute can do this pretty easily. Branch call flow based on channel variable ${FROM_DID}

1 Like

@lgaetz Thanks for the info. I looked through the example and documentation at voipsupport.it/wiki/index.php/Dynamic_Routes_Example_configuration, but wasn’t able to find how to set the channel variable, and unfortunately couldn’t find any other references. Are you able to point me in the right direction? I’m assuming the settings I need to change are under Dynamic Route Lookup, but I’m not sure which type would be for the Channel. Thanks.

The channel variable ${FROM_DID} is already populated with the DID for all inbound calls. You just need to specify that variable in dynroute, and set the destinations based on that value.

1 Like

Just in case anyone else is looking for this information, place FROM_DID under Dynamic Route Lookup Source. For Source Type select AGI, and then under dynamic route entries place your DID number, and fill out the default destination.

1 Like

I’m a little surprised that works. The correct™ way to do this is to use “Asterisk Variable” for the source type.

I honestly have no clue… I just tried it with Asterisk Variable, because I would rather it be setup the proper way, then run into a problem later on down the road. However, it wouldn’t work for me it goes to the default destination.

The var may need to be wrapped in ${}, try setting variable to ${FROM_DID}

1 Like

That works perfectly. Thank you @lgaetz

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.