Setting up Boss/Secretary using Dynamic Routes

See this thread for background: Checking Queue Caller Count with Dynamic Routes

Suppose you have a traditional Boss/Secretary arrangement where you want most calls to the boss to be intercepted by a secretary/admin assistant. The secretary acts as gatekeeper and has the ability to call the boss or transfer callers to the boss. And also suppose we have a select group of executives that can call the boss directly and bypass the secretary. If the accountcode is not already in use for accounting or pinsets, then one way we might do this is as follows:

  • Have a MIsc Application or virtual extension configured that everyone uses to call the boss.

  • Have the boss’ true extension be a secret. The boss’ CID Num Alias is set to the MIsc. Application.

  • For each extension that has the ability to call the boss directly, edit their extension, advanced tab and set the accountcode to ‘boss’ or whatever string you prefer. (A clever idea by @billsimon source.)

  • The Misc Application or virt extension goes to a Dynamic Route, and the dynroute is configured with Asterisk Variable, has substitutions disabled and this expression:

    $["${DB(AMPUSER/${CALLERID(number)}/accountcode)}"="boss"]
    

The above expression will return a 0 if there is no match, or a 1 if there is a match. You can then create dynroute destinations of 0 and 1 with the appropriate destination for each, one to the secretary and one to the boss’ true extension.

2 Likes

This is clever. I love these Dynamic Route posts, I feel like I’m just scratching the surface and every time you post about it it gives me about a dozen different ideas about usable applications. Thanks :grin:

1 Like

This exact scenario came up in support this morning. I feel like the price checker at the dollar store. Every time someone asks me 'How do I …" I just automatically answer dynroutes before they finish.

1 Like

That’s been 90% of your answers recently in the forum lol. If it works, it works :wink:

As one who has a long extensions_custom.conf file full of hackery, I appreciate that some of these things can now be done in the GUI instead. Thanks @lgaetz !

3 Likes

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

Going thru this recently with @slobera and we discovered that it’s not so simple to obscure a local extension number for a boss extension as is required for this work correctly. You can set the “CID Num Alias” for the extension on the advanced tab, and outgoing calls from the Boss extension will carry the obscured CID Number, but for calls that are indirectly connected to the Boss, ConnectedLine will show the actual secret CID number.

This dialplan hook will correct for this:

[macro-dialout-one-predial-hook]
exten => s,1,Noop(Entering User defined context macro-dialout-one-predial-hook in extensions_custom.conf)
;exten => s,n,DumpChan   ; uncomment for debug
exten => s,n,Set(CONNECTEDLINE(num)=${DB(AMPUSER/${EXTTOCALL}/cidnum)})
exten => s,n,MacroExit

https://issues.freepbx.org/browse/FREEPBX-22958