[Asterisk-Users] Pattern matching problem

Eric "ManxPower" Wieling eric at fnords.org
Wed Apr 26 17:05:00 MST 2006


1) Your exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN}) does not start with 
priority "1" so it will never match

2) The 10 digit number you dialed does not start with a 1 so it will 
never match, even if the priority issue is fixed.

Asterisk knows that once you've dialed 7 digits no OTHER pattern can 
match what you are dialing and so it matches the 7 digits you dialed.

For the most part exten => i is only run during IVR (WaitExten, 
Background, etc) and not when dialing from a phone.

BTW, this works just like the Telco.  You can dial as many extra digits 
as you want, and the telco will ignore the extra ones, which is why you 
can dial 1-800-PROGRESSIVE it will work (assuming such a number exists).

hugolivude wrote:
> I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
> matching problem:
> 
> I have the following in my dial plan:
> exten => _NXXXXXX,1,NoOp(Number dialed ${EXTEN})
> 
> exten => _NXXXXXX,n,Dial(Zap/1/${EXTEN})
> 
> 
> Unless I'm missing something, I wouldn't expect the pattern above to
> match a 10 digit number, but when I dial 6137451576, I see the
> following in the CLI:
> 
>     -- Executing NoOp("Zap/1-1", "Number dialed 6137451") in new stack
>     -- Executing Dial("Zap/1-1", "Zap/1/6137451") in new stack
> 
> As you can see, the last 3 digits are truncated in the dial cmd.
> 
> This is odd behaviour isn't it?   _NXXXXXX shouldn't be a match for a
> 10 digit number!
> 
> The other patterns I have are:
> 
> 
> exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
> exten => _011.,n,Dial(Zap/1/${EXTEN})
> 
> so in fact I would have expected 6137451576 to fall thru to here:
> 
> exten => i,1,AbsoluteTimeout(15)
> 
> exten => i,n,Playtones(congestion)	
> 
> exten => i,n,Congestion
> 
> exten => i,n,Hangup



-- 
Now accepting new clients in Birmingham, Atlanta, Huntsville, 
Chattanooga, and Montgomery.



More information about the asterisk-users mailing list