[Asterisk-Users] wildcard matching in dialplan

Phil Blundell pb at reciva.com
Sun Jan 22 09:42:11 MST 2006


I'm trying to write some dialplan patterns to allow my users to control
call forwarding from their handsets.  Right now, I have this in
extensions.conf:

[forwarding]
exten => _*21*X.X*,1,Macro(set-cfim,${CALLERIDNUM},${EXTEN:4})

I was hoping that this would match any string of the form *21*nnn*,
where nnn is 3 or more digits.  But Asterisk seems to ignore the final
X*, and allows it to match strings of any length that start *21*nn.
This is a problem because many of my users are using GXP-2000s with
Early Dial enabled: I need Asterisk to go on rejecting the number with
"484 address incomplete" until it sees the final * digit.

Can anybody give me a clue how to accomplish this?

thanks

p.





More information about the asterisk-users mailing list