ossobv / asterisklint

Asterisk PBX configuration syntax checker
GNU General Public License v3.0
61 stars 12 forks source link

regex producing invalid priority error #48

Closed perkons closed 3 years ago

perkons commented 3 years ago

OpenBSD 6.8 Asterisk 18.1.1

asterisklint dialplan-check extensions.conf produces error:

extensions.conf:9 E_DP_PRIO_INVALID: invalid priority '3]XX'

Content of extensions.conf:

[general]
static=yes
writeprotect=yes
clearglobalvars=no

[globals]

[phones]
exten => _[2,3]XX,1,NoOp(Incoming call for ${EXTEN})
wdoekes commented 3 years ago
_[2,3]XX,1,NoOp(Incoming call for ${EXTEN})

It is not a regex, nor it is a glob-pattern. It's an asterisk-specific thing.

And AsteriskLint rightly complains. You should have _[23]XX

perkons commented 3 years ago

Yes, this is an old config on our Asterisk hosts. Just changed and tested it, it is working like this _[23]XX

perkons commented 3 years ago

Thanks for the fast answer!