Dynamic Routes Question - Digit Timeout

I have a dynamic route where I am prompting the caller to collect 10 digits OR press 1 or 0 to connect to x or y.

My question is: Is there a way to set the validation REGEX so that if the caller presses 1 or 0 it immediately moves on the routing?

Otherwise it’s the normal timeout (five seconds) while I wait for the caller to input their DTMF.

The 10-digit input will never start with a 1 or 0, so I know as soon as I get that digit, its time evaluate. Is this possible? @lgaetz do you know?




That did not seem to do it, but maybe I am off on my regex, or maybe validation on dynamic routes wont let me avoid the timeout.


func_strings.c: Malformed input REGEX(): Invalid preceding regular expression

So, I am likely missing something. @dicko a penny for your thoughts?

IMPE Asterisks’ implementation of regexes has never been reliable past the basics.

Try .adding routes so you don’t need “curlies”

1 Like

Some progress


This will validate that the input is either one digit (a 1 or 0) or 10 digits with the first number starting between 2-9.

I am still trying to figure out how to make pressing 0 or 1 instantly advance instead of waiting for the timeout to time out. Any ideas are welcome.

can you chain two dynamic routes so the first one deals with the 1 or 0 with a timeout of zero then that forwards onto the second dynamic route to deal with the rest.

Good idea. I considered this, but I don’t want to prompt them for input twice.

I think I am barking up the wrong tree unfortunately. To do what I want (instant time out if 1 or 0 is pressed, otherwise collect the full 10 digits) I think I need Asterisk extension patterns, which Dynamic Routes does not have. I wonder if it could be a feature enhancement at some point, but it is what it is for now. For future readers, my REGEX above will block anything that not a 1, 0 or NXXXXXXXXX

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