How to block DTMF reading in dialplan?

Hello,

I have a dialplan that reads a 9-digit security pin from the user, through the read function like this:

exten => s,13(collect),Read(digits,9)

Problem is that the IVR listens for input even after that, so if the user accidentally types 10 digits, the tenth is taken as an extension input, and since there’s no such extension, it cancels the call. Is there any way to stop Asterisk “listening” for digits after the 9 digits that are meant to be read?

Thank you in advacnce,

Use this…

exten => s,13(collect),Read(digits,9,3)

The 9 is the max digits they can enter, and 3 is the timeout. The timeout is used if they type less than 9 digits. It will wait 3 seconds for another DTMF.

1 Like