[asterisk-users] Configuration / dialplan problem

Marco Mouta marco.mouta at gmail.com
Tue Oct 3 02:03:16 MST 2006


If you really want _07. to be tested afterall the above patternmatches, you
must define it in other context and add it as an include for the current
context.

Asterisk first will look for your patternmatches in the current context and
oonly after this will lookup your include context. This way you can avoid
the asterisk "resort"!

pls give some feedback if it helps...

On 10/3/06, Kevin Smith <kevin.smith at mercury.net> wrote:
>
> There are a few things to look at.
>
> First off, you have a lot of wildcard testing that is probably throwing
> the dial plan off. For example, you have the following:
>
> exten => _07956nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> exten => _07879nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> exten => _07862nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> exten => _07.,1,Congestion()
>
> If I left it in this order what would happen? From what I understand it
> is nautral to think in that order, but really Asterisk is going to sort
> the extensions something like this:
>
> exten => _07.,1,Congestion()
> exten => _07956nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> exten => _07879nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> exten => _07862nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
>
> So now say you dial 07545865143254/8564, it will go to the Congestion
> application every time.
>
> What I would do is comment out the wildcard searches and see if that
> resolves the problem. If so, try putting all the wildcard tests in an
> include and see if that helps.
>
> Take a look at these to articles as well:
> http://www.voip-info.org/wiki/index.php?page=Asterisk+Extension+Matching
>
> http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf+sorting
>
> Also just out of observation, why all the testing? Seems to me you could
> streamline that code down a bit more. For example, the 01 and 02 tests.
> If you know they are dialing N number of digits, make the test
> _01XXXXXXXXXX, so you know they have to dial a certain amount of digits
> to be a valid call. Why send a 4 digit number out your trunk if you know
> it isn't going anywhere? If you need to dial '0' then 10 digits, try this:
>
> _01NXXNXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> _02NXXNXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> _07956XXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN}) 3
>
> etc.
>
> Hopefully that will help,
>
> Kevin
>
>
> Mark Muffett wrote:
> > I have my extensions.conf set up as follows:
> >
> > exten => _Z.,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _07956nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _07879nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _07862nnnnnn,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _01.,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _02.,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _0800.,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _0845.,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _0870.,1,Dial(${OUTBOUNDTRUNK}/${EXTEN})
> > exten => _09.,1,Congestion()
> > exten => _00.,1,Congestion()
> > exten => _07.,1,Congestion()
> >
> > (where nnnnnn are actually real digits).
> >
> > I would expect this to let me dial the 07956nnnnnn numbers etc while
> > stopping dialing to other 07... numbers, but it seems to stop dialling
> > to any 07... number including the 3 specifically listed.
> >
> > Any ideas?
> >
> > Thanks
> >
> > Mark
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Com os melhores cumprimentos,

Marco Mouta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061003/4387fc7b/attachment.htm


More information about the asterisk-users mailing list