exten => _18[06-8][06-8]NXXXXXX,1,Dial(IAX2/[EMAIL PROTECTED]/${EXTEN})

Maybe I don't understand the question but the above works fine for me.
This would match 1800, 1866, 1877, 1888, but also 1867, 1878, etc. I
don't see a security risk with allowing these combination of numbers.

If you only want to allow 1800, 1866, 1877, and 1888 using the same
Dial cmd and not any other possibilities you could use the Goto cmd.

[main]
exten => _1800NXXXXXX,1,Goto(tollfree,${EXTEN},1)
exten => _1866NXXXXXX,1,Goto(tollfree,${EXTEN},1)
exten => _1877NXXXXXX,1,Goto(tollfree,${EXTEN},1)
exten => _1888NXXXXXX,1,Goto(tollfree,${EXTEN},1)

[tollfree]
exten => _18[06-8][06-8]NXXXXXX,1,Dial(IAX2/[EMAIL PROTECTED]/${EXTEN})

This way by the time you get to the tollfree context you know for sure
its one of the numbers you wish to allow.

Blaine Aldridge

On 8/18/06, David Cook <[EMAIL PROTECTED]> wrote:
Maybe I'm daft, but can asterisk to 'or' logic in dialplan matches sort
of like the SPA's can?

Tollfree numbers for example. I can have a line for each combination:
exten => _1800NXXXXXX, Dial, ............
exten => _1866NXXXXXX, Dial, ............
exten => _1877NXXXXXX, Dial, ............
exten => _1888NXXXXXX, Dial, ............

But I want to do is something like this:
exten => _18[0678][0678]NXXXXXX, Dial, .............

Or to prevent the logic error which albeit small, the above would create:
exten => _18[00,66,77,88:2]NXXXXXX, Dial, ......
(representing that the next 2 chars must equal any of '00'.'66','77' or '88'

Is there any syntax that allows this??

dbc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to