On 13 October 2016 at 13:18, Tony Mountifield <t...@softins.co.uk> wrote:

> exten => _X,1,NoOp(Matching single digit)
> exten => _X.,1,NoOp(Matching multiple digits)
> exten => _X!,2,SayNumber(${EXTEN})
> exten => _X!,3,Etc..

Thanks - I appreciate the idea, but it matches more than 2 digits.

But, thanks to your info, I cobbled together something that works, and
matches only 1 or 2 digits in what I think is the most compact way, by
sending a 1 digit extension to the 2 digit matcher, prefixed with a 0.
Example which works:

exten => s,1,Set(TIMEOUT(digit)=1)
    same => n,BackGround(extension)
    same => n,WaitExten(5)
exten => _X,1,Goto(0${EXTEN},1)
exten => _XZ,1,SayNumber(${EXTEN})
    same => n,Goto(s,1)
exten => e,1,Goto(s,1)

***HOWEVER!!!!*** Do I need to report a bug?


A: All the documentation is wrong and ". (period) Wildcard match;
matches one or more characters" is NOT actually how Asterisk works.
B: The documentation is correct and Asterisk's "one of more character
matching" routine is wrong
C: I've completely misunderstood what "matches one of more characters" means :)

What's the consensus? Thanks!

-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016

New to Asterisk? Start here:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

Reply via email to