Control multiple Inbound Routes with Single Flow Control

I’m trying to find a solution for the following situation;

  • There are multiple DID’s, each configured with his own inbound route.
  • Each inbound route has a different destination (IVR, Ring Group , etc)

I want to change the destination of every DID with a single Flow Control.
There are solution where you trigger multiple Flow Controls from a single Flow Control, but that is not the solution I need… (you will need n+1 Flow Controls, and is doubles with every new flow…)

This is the normal way to set-up the flow control;

Inbound Routes:

  • DID: 666-6666666 (Destination: Flow Control FC6)
  • DID: 777-7777777 (Destination: Flow Control FC7)
  • DID: 888-8888888 (Destination: Flow Control FC8)

Flow Control:
FC6 with;

  • Day(6) to Ring Group (6)
  • Night(6) to Announcement (6)
    FC7 with;
  • Day(6) to Ring Group (7)
  • Night(6) to Announcement (7)
    FC8 with;
  • Day(6) to Ring Group (8)
  • Night(6) to Announcement (8)

In this situation you have to change 3 Flow Controls (or you uses some code to change those 3 from a single FC

I’m trying to create a different way of handling Centralized Flow Control;

Inbound Routes:

  • DID: 666-6666666 (Destination: Central Flow Control)

  • DID: 666-66666661 (Destination: Ring Group 6)

  • DID: 666-66666662 (Destination: Announcement 6)

  • DID: 777-7777777 (Destination: Central Flow Control)

  • DID: 777-77777771 (Destination: Ring Group 7)

  • DID: 777-77777772 (Destination: Announcement 7)

  • DID: 888-8888888 (Destination: Central Flow Control)

  • DID: 888-88888881 (Destination: Ring Group 8)

  • DID: 888-88888882 (Destination: Announcement 8)

Flow Control:

  • Day: Misc Destination : *9991 (custom feature code 999 with option 1)
  • Night : Misc Destination : *9992 (custom feature code 999 with option 2)

When someone calls: 777-7777777…
Flow Control (Day) will: use Misc Destination *9991

“Some” code will: place call in {from-trunk} and add “1” to the DID

Inbound Route DID: 777-77777771 will be used and go to Destination: Ring Group 7

I've modified extensions_custom.conf, and added;
exten => *9991,1,Goto(from-internal,*9991,1)
;--== end of [ext-featurecodes-custom] ==--;

exten => *9991,1,Goto(from-trunk,${EXTEN}1,1)
;--== end of [Modified-DID] ==--;

This does not work…

Does someone know how to direct a call to the inbound routes, and add a digit to the DID?

I can think of a couple of ways to do this.

  1. Send the incoming DID’s to a custom context that will need to check the daynight / Call Flow Control and perform some kind of lookup to know where to route the individual DIDs to. You would need a DB entry somewhere to track where to send the calls to.
  2. You write a script that runs via cron every minute that will detect the change of a single CFC and update each CFC for each DID (via DB), then force a reload of the dialplan. When you switch the primary CFC, within one minute all of the others are updated as well.
    Good Luck!

There are other ways to deal with this as well, including having a single “entry point” (say the time condition) and then sending the call to your “from-external,s,1” context in a MiscDest. This way, your DID process can manhandle the incoming call as if it was directed there in the first place.

@lgaetz posted (IIRC) some pointers to getting this working a couple of months ago.

There are several ways to do this without any custom dialplan.

IMO the easiest for your eventual replacement to understand is to route each ‘dynamic’ DID to a dummy Time Condition, which has no Time Groups and would normally be always unmatched. In each Time Condition, set Call Flow Toggle Associate with to the central flow control to force the condition true.

Alternatively, using your pseudo-DID idea, route each dynamic real DID to the central flow control. The Normal Flow exit goes to a Custom Destination with target
and the Override Flow exit goes to one with target
Then, program your pseudo-DIDs as desired.

Thank you all for the replies…

I wil look in the method with the Dummy Time Condition.

…but the problem with my custom feature remailns:

I’m not sure if I created the custom feature in the right way (I couldn’t find a manual)
I’, not sure if the code “Goto(from-trunk,${EXTEN}1,1)” is te correct way to add the digit “1” tot the DID, and place it back tot the inbound routes…

My idea came from the feature 7777 (simulate incoming call : Goto(from-pstn,${EXTEN},1)