Extension Routing - Internal Versus External Calls - GUI Setup

Just want to confirm this to be the best GUI based solution to an age old question without clear answers - Routing destination for calls to an extension that are not answered

NOTE: My goal was to route internal calls to Voicemail and External Calls to another Call Center if the extension was not answered. Secondary Goal avoid complex Ring Groups and Queues method that has been suggested as well to keep the administration of updating as simple as the implementation with as few steps as possible but this solution could be altered to many different scenarios at the extension level.

So the Extension will make use of Find Me / Follow Me as the NO ANSWER option points to a Dynamic Route setup as the following:

Set up Dynamic Route using:

Dynamic Route Lookup Source Section:
Source Type β†’ Asterisk Variable
Enable Substitutions β†’ NO
Asterisk Variable β†’ [NUMBER]

Dynamic Route Default Entry Section
SET DESTINATION TO WHERE EXTERNAL CALLS WILL GO / FAILOVER DESTINATION
In my case it was a Misc Destination for external call center

Dynamic Route Entries Section
Match β†’ ZXX (extensions that are 3 digits long) β†’ Extensions Voicemail
Match β†’ ZXXX (extensions that are 4 digits long) β†’ Extensions Voicemail

ENABLE SUBSTITUTIONS = YES when using Variables like [NUMBER]

the ZXX for match does not work so that part is still needing fixed. Anyone know what the match value should be to match 3 and 4 digit extension #s, I am sure this is just an expression formatting issue or maybe the match must be explicit?

Thanks for any insights anyone provides.

I also have tried an expression and it did not work

^ [ 0 - 9 ] \ { 3 , 4 \ } $

Which should check for 3 or 4 digit lengths for the variable value, NO SPACES in expression but posting here changes the string so I had to add the spaces between characters

You can avoid that by enclosing the string in `` (backquotes) on a line by itself.
^[0-9]\{3,4\}$

1 Like

Thank you! Now if someone could tell me what I am doing wrong for the match entry in this Dynamic Route, life would be better :slight_smile:

A possible rethink, any call that traverses an inbound route will have the FROM_DID channel variable set with the dialed number. Local calls won’t have this, so an expression like this

${ISNULL(${FROM_DID})}

should evaluate to either a 0 (the variable is null so local) or a 1 (the variable is populated therefore a trunk call). You would then create match entries for 0 and 1 like in this example.

Only issue there is that intra-pbx trunks would fall into that category correct? So only local to the pbx extensions would be routed to voicemail in this scenario.

Tried this but it would not route, just went to the Default Destination

@comtech You referenced this use case for the
^[0-9]\{3,4\}$
In this post, Asterisk Rexex Help - #4 by comtech - Asterisk Dialplan - Asterisk Community

Any idea why this would not be working? Thank you.

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