[Asterisk-Users] Re: Pattern matching problem
Waldo Rubinstein
waldo at trianet.net
Wed Apr 26 17:40:45 MST 2006
H,
One thing is what you type in extensions.conf and another is how
Asterisk sees the dial plan. In the CLI, do a show dialplan and look
for your entries. Asterisk may re-order them differently.
In theory, your regexp should NOT match your 7 digit number. It could
be a bug. Try commenting out the 10 digit regexp and see if the call
is picked up by that 7 digit regexp.
- Waldo
On Apr 26, 2006, at 8:34 PM, hugolivude wrote:
> Thanks, but the problem's with the first extension:
>
> exten => _NXXXXXX,1,NoOp(Number dialed ${EXTEN})
> exten => _NXXXXXX,n,Dial(Zap/1/${EXTEN})
>
> The problem is I _do_ get a match as you can see by the CLI output,
> but it shouldn't match IMO - 6137451576 shouldn't match _NXXXXXX but
> that line gets executed.
>
> There was a cut/paste error with the others BTW. I thought I'd
> replaced the defines with the actual numbers for clarity, but I made a
> mistake. They are actually this way in my plan:
>
> exten => ${LD_PATTERN},1,Dial(Zap/1/${EXTEN})
> exten => ${INT_PATTERN},1,Dial(Zap/1/${EXTEN})
>
> Thanks,
> H
>
> On 4/26/06, Eric ManxPower Wieling <eric at fnords.org> wrote:
>> 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.
>> _______________________________________________
>> --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
More information about the asterisk-users
mailing list