I think Mike's suggestion is easier to implement and manage but I'll
tell you this because it's a matter of asterisk fundamentals and it's
someplace where people get hungup when writing for their dialplan.

The reason that your _X. extension fires instead of your DID extension
is that Asterisk does not process extensions in order of appearance in
the .conf files.  It reads them all in then sorts them according to
it's own design.  It's sort method is basically arbitrary so it won't
do you much good.  What's important is that it doesn't work from
specific to general the way we might like it to work.  If you're
interested in knowing how it _does_ sort them, issue 'show diaplan'
from the CLI.

If you want to enforce processing order, you have to use include
statements.  For example, if you want asterisk to try apples, then
oranges then bananas you have to do it like this:

[sequential-fruit-context]
include apples-context ; this is where you'd put your defaults (s,h,etc)
include oranges-context ; this is where you'd put your explicit DIDs
include bananas-context ; this is where you'd put that catchall.  Only
executes if no match.
#include grapefruit ; oh yeah, it also holds for files

There's a little tidbit that should serve you well for years to come.

Dave

On 7/31/06, Andy Jaikissoon <[EMAIL PROTECTED]> wrote:
The following is the coding in the system where it always hits:

[ext-did]

include => ext-did-custom
exten => s,1,Goto(DISA,1,1)
exten => 4165551212,1,Goto(DISA,1,1)
exten => _X.,1,Noop(Catch-All DID Match - Found ${CALLERIDNUM})
exten => _X.,n,Goto(ext-did,s,1)
; end of [ext-did]

==================================================================================



All calls seem to hit the _X. section which I don't want.  Also, those 2
lines were created when I installed my Trixbox.  I've tried commenting those
lines out but the call then fails.  Maybe I'm missing something here so if
anyone could let me know, that would be appreciated.



Andy Jaikissoon


--
David Donovan
Consultant
Fulcrum Solutions

Reply via email to