[asterisk-users] Dialplan matching

Tilghman Lesher tilghman at meg.abyt.es
Mon Apr 4 12:58:38 CDT 2011


On Monday 04 April 2011 09:09:28 Asterisk User 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)

This one is okay.

> exten => _01137455.,2,Goto(intl-disabled,s,1)

Change this to priority 1.

> exten => _01137477.,3,Goto(intl-disabled,s,1)

Change this to priority 1.

> exten => _0113749.,4,Goto(intl-disabled,s,1)

Change this to priority 1.

> exten => _011.,5,Goto(intl-disabled,s,1)

Change this to priority 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

This looks like it should be starting from priority 1, extension "s",
context [intl-disabled].

> 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.

The major problem in your dialplan is that you WANT to have multiple start
points, but the way you have it written, there is only ONE start point.
Everything else is simply ignored.  Extensions will only start in the
dialplan from priority 1.

-- 
Tilghman



More information about the asterisk-users mailing list