[asterisk-users] Dialplan "or" matching

William Moore nyphbl8d at gmail.com
Fri Aug 18 10:04:11 MST 2006


On 8/18/06, David Cook <dbc_asterisk at advan.ca> 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, .............

This syntax is valid and would work for what you're doing, but as you
said, there is a chance of logic error in it.
>
> 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'

As for this syntax, Asterisk does not respect the [], so it parses the
66 as the priority.  I have no idea how to properly do this in one
line if it is possible.


Kinsey



More information about the asterisk-users mailing list