[Asterisk-Users] Re: Pattern matching problem
Eric "ManxPower" Wieling
eric at fnords.org
Wed Apr 26 18:07:04 MST 2006
You are correct. _NXXXXXX matches 6137451. Once Asterisk sees 7
digits, the first digit not being a 1 or 0, and since it sees that no
other patterns can match, it immediately stops listening for DTMF and
starts dialing.
If you don't like that then add:
exten => _NXXNXXXXXX,1,Goto(i,1)
And that will match your 10 digits. But of course, since Asterisk now
has pattern matches for both 7 digit and 10 digit numbers, when you dial
a 7 digit number Asterisk will wait for DigitTimeout before deciding
that you wanted to dial 7 digits and not 10 digits.
Or you could add exten => _NXXXXXX.,1,Goto(i,1) Which will match 8 or
more digits.
hugolivude wrote:
> Thanks for responding but I find that hard to believe.
>
> Clearly 6137451576 doesn't match _NXXXXXX so why does it get executed?
> It should fall thru. Since there's no other match so it should go to
> my i extension.
>
> It doesn't make sense that ${EXTEN} = 6137451 either given the number
> dialled (what happened to the last three digits). It can't possibly
> be designed to drop digits or the Dial command would never work!
>
> I imagine that the erroneous ${EXTEN} value is related to the pattern
> matching problem so that's understandable, but the pattern matching
> (at least in this case) appears broken to me.
>
> H
>
> On 4/26/06, Eric ManxPower Wieling <eric at fnords.org> wrote:
>> This is just the way Asterisk works.
>>
>> 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.
>> --
>> 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
>
--
Now accepting new clients in Birmingham, Atlanta, Huntsville,
Chattanooga, and Montgomery.
More information about the asterisk-users
mailing list