Dialplan question

I have a system where I have many random IAX clients registered to my server. The username is self provisioned via some online tools. Basically I just want to allow anyone to call anyone, so long as they know the users name. My issue is in the pattern matching in the dialplan. This is what I currently have:

exten => _.,n,Dial(IAX2/${EXTEN},60)

I have it open to full ‘wildcard’ values but, I get warnings in my CLI when I reload the dialplan. It says I will get unexpected behaivor… which is true :smile:

Whenever anyone hangs up, it jumps right back into the Dial(), because “h” matches the pattern as well. What would be the appropriate pattern to deal with this situation.

I need to deal with:

Alpha Upper/Lower
Digits
Hyphen
Underscore
Etc

Thanks,
G

To allow anything you might want to use:

exten => _X.,1,Dial(IAX2/${EXTEN},60)
exten => _X.,n,Hangup

The warning will then disappear.

isn’t the X going to allow only numerics?

yes, and if it can be something else, regroup the allowed
characters between brackets:

_[*#0-9]!

The ! means it can be repeated.