Route to voicemail boxes after queue

Ive got a strange use case here that I know is more dialplan/asterisk than Freepbx, but I’m still hoping someone can assist me.

Situation: Multiple phone numbers call into a queue (inbound route[cid prefix] → time conditions → Queue

each inbound route sets a unique CID prefix, so queue agents can answer correctly.
I want to route these queue calls to a voicemail box based on the inbound number they called.

I believe that the Dialed Number is lost when the caller leaves the queue… but I should still have the CallerID Name.

my goal here is to Basically make a switch statement out of Dialplan in a dynroute, similar to:
gotoif([${CALLERID(name)[:0:3]} = “AAA”],Magic)
gotoif([${CALLERID(name)[:0:3]} = “BBB”],magic2)
goto( the default option)

My question here is:
How in the world do I use a dynroute to actually Route the call either to a mailbox or to a virtual extension (which would then route to its mailbox)?

im Basically trying to make a switch-statement in Dialplan…

Dialed number is not lost. Unless you are doing something way out of the ordinary, the channel var ${FROM_DID} will be the DID used at the inbound route. After the queue, the caller could end up at a dynroute, you can branch by that Asterisk variable, and then just define separate entries at the bottom for each DID that goes to Voicemail → ext# or whatever other destination you want.

any specific magic needed to actually Route the call out?
that’s where I’m struggling - the actual “now call extension 1234”

It’s the config of the dynroute at the bottom. Something like this:

that WOULD be easier than doing it by hand… yes…
Thanks as always.

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