[*] Using a '#' termninator for a variable length extension

John Lange john.lange at open-it.ca
Tue Jul 31 15:41:37 CDT 2007


A while back at one of our meetings, the question was raised as to how
to use a terminator digit for entering PINs or other things in Asterisk.

Just so happens I was faced with a similar problem today and solved it
using a few functions and some variable math in Asterisk like this:

exten => _X#,1,Goto(${EXTEN:0:$[${LEN(${EXTEN})}-1]},1)

Ugly, ugly ugly but that's the way it's done.

I don't know off hand how long those features have been available in
Asterisk but they were added some time in 1.2.

Regards,

John




More information about the Asterisk mailing list