Extension names are not limited to single specific extension "numbers". A single extension can also match patterns. In the extensions.conf file, an extension name is a pattern if it starts with the underscore symbol (_). In an extension pattern, the following characters have special meanings:
Special Characters for Pattern Matching
X matches any digit from 0-9
Z matches any digit from 1-9
N matches any digit from 2-9
[1237-9] matches any digit or letter in the brackets
(in this example, 1,2,3,7,8,9)
[a-z] matches any lower case letter (introduced in which Asterisk version?)
[A-Z] matches any UPPER case letter (introduced in which Asterisk version?)
. wildcard, matches one or more characters
! wildcard, matches zero or more characters immediately
(only Asterisk 1.2 and later, see note)
链接:
http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns