[asterisk-users] Dialplan matching
Steve Murphy
murf at parsetree.com
Mon Apr 4 10:04:35 CDT 2011
On Mon, Apr 4, 2011 at 8:09 AM, Asterisk User <asteruserlist at gmail.com>wrote:
>
> Hello all, I am trying to figure out the logic in on prefix matching for
> Asterisk 1.4.5. I want to be able to pass all international calls EXCEPT
> calls to 011870, 01137455 and so on.
>
> exten => _011870.,1,Goto(intl-disabled,s,1)
> exten => _01137455.,2,Goto(intl-disabled,s,1)
> exten => _01137477.,3,Goto(intl-disabled,s,1)
> exten => _0113749.,4,Goto(intl-disabled,s,1)
> exten => _011.,5,Goto(intl-disabled,s,1)
> exten => _011.,6,Playback(all-outgoing-lines-unavailable)
> exten => _011.,7,Wait(1)
> exten => _011.,8,Playback(please-hang-up-and-dial-operator)
> exten => _011.,9,Hangup
>
> Is this correct or should it be:
>
> exten => _011870X,1,Goto(intl-disabled,s,1)
> exten => _01137455X,2,Goto(intl-disabled,s,1)
>
> I tried searching for definitive information on voip-wiki, nerd vittles,
> but there is a lot of confusion.
>
Assuming that 011870 is followed by more than digit, normally, I'd say your
first set is more applicable.
The . in the pattern at the end means any number of digits, followed by a
timeout.
If you know the number of digits, and it is fixed, then you could use
_011870XXXXXXX or similar to avoid the timeout, and begin the Goto
immediately on reception of the final digit.
The X in the second set will match just one digit, and the Goto will be be
executed.
Does that help?
>
>
> --
Steve Murphy
ParseTree Corporation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110404/3152eb0c/attachment.htm>
More information about the asterisk-users
mailing list