REGEXP always fails

Hi all,
I am testing following regexp but it always fails and goes to “invalid-number”.
I tested with online tools and I am pretty sure this regexp is correct.
But, for instance, if I call 0456789433 it fails. But should not!
Ho does Asterisk “intend” regexp format?

exten => _X.,n,GotoIf($[${REGEX(“^(0|3|00)\d{5,})$”, ${EXTEN})}]?dial-carrier:invalid-number)

Regards

I suspect it needs an extra backslash.

However, I’d also suggest a better approach would be:

exten => _[03]XXXX.,n,GoTo(dial-carrier)
exten => _00XXXX.,s,GoTo(dial-carrier)
exten =>  _X.,s,GoTo(invalid-number)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.