Discussion:
[Asterisk-Users] Pattern matching problem
hugolivude
2006-04-26 23:37:04 UTC
Permalink
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


Thanks,
Hugh
Eric "ManxPower" Wieling
2006-04-27 00:05:00 UTC
Permalink
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).
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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.
hugolivude
2006-04-27 00:34:56 UTC
Permalink
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
Post by Eric "ManxPower" Wieling
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).
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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
http://lists.digium.com/mailman/listinfo/asterisk-users
Eric "ManxPower" Wieling
2006-04-27 00:37:13 UTC
Permalink
This is just the way Asterisk works.
Post by hugolivude
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.
hugolivude
2006-04-27 00:52:34 UTC
Permalink
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
Post by Eric "ManxPower" Wieling
This is just the way Asterisk works.
Post by hugolivude
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
http://lists.digium.com/mailman/listinfo/asterisk-users
Eric "ManxPower" Wieling
2006-04-27 01:07:04 UTC
Permalink
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.
Post by hugolivude
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
Post by Eric "ManxPower" Wieling
This is just the way Asterisk works.
Post by hugolivude
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
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Now accepting new clients in Birmingham, Atlanta, Huntsville,
Chattanooga, and Montgomery.
Waldo Rubinstein
2006-04-27 00:40:45 UTC
Permalink
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
Post by hugolivude
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
exten => ${LD_PATTERN},1,Dial(Zap/1/${EXTEN})
exten => ${INT_PATTERN},1,Dial(Zap/1/${EXTEN})
Thanks,
H
Post by Eric "ManxPower" Wieling
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).
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Andrew Kohlsmith
2006-04-27 00:53:08 UTC
Permalink
Post by hugolivude
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.
When you dial "six one three seven four five one" Asterisk says "hey! That
matches _NXXXXXX!" -- the fact that you have "five seven six" left means
nothing, just as you can dial 1-800-PROGRESSIVE as Eric stated earlier.

On analog Zap interfaces, Asterisk (just like the telco) simply listens until
the digits match. If you don't want a ten digit number to match, then adjust
your dialplan accordingly. This is not a strange error in Asterisk, it is a
mismatch between what you want the system to do and how the system operates.

Digital Zap channels and VOIP channels do not work this way because the entire
number is sent in one "go" -- when you dial from a SIP phone, Asterisk does
not see a stream of digits, it sees one "message" or "packet" of information
with the entire phone number in it. That is why it doesn't match with SIP or
IAX or PRI channels. (overlap dial excepted.)

-A.

-A.
Post by hugolivude
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
exten => ${LD_PATTERN},1,Dial(Zap/1/${EXTEN})
exten => ${INT_PATTERN},1,Dial(Zap/1/${EXTEN})
Thanks,
H
Post by Eric "ManxPower" Wieling
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).
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
kevin ling
2006-04-27 00:54:53 UTC
Permalink
Hi,

Same dial pattern on my extension.conf, But it's work great. The Asterisk
only match 7 digits number. My * version is 2.1.6.

Kevin

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of hugolivude
Sent: Thursday, April 27, 2006 8:35 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Re: Pattern matching problem

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
Post by Eric "ManxPower" Wieling
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).
Post by Eric "ManxPower" Wieling
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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
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
hugolivude
2006-04-27 01:07:24 UTC
Permalink
Thanks Kevin, your explanation resonated better with me. Sorry for
doubting you Eric ;-)

So the answer is to add another extension:
exten => _NXXXXXX,1,Dial(Zap/1/${EXTEN})
exten => _NXXXXXXXXX,1,<do something else>

Thanks for sticking with me... Works now...

H
Post by kevin ling
Hi,
Same dial pattern on my extension.conf, But it's work great. The Asterisk
only match 7 digits number. My * version is 2.1.6.
Kevin
-----Original Message-----
Sent: Thursday, April 27, 2006 8:35 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Re: Pattern matching problem
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
exten => ${LD_PATTERN},1,Dial(Zap/1/${EXTEN})
exten => ${INT_PATTERN},1,Dial(Zap/1/${EXTEN})
Thanks,
H
Post by Eric "ManxPower" Wieling
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).
Post by Eric "ManxPower" Wieling
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
hugolivude
2006-04-27 01:09:02 UTC
Permalink
Sorry meant to say thanks Andrew!! I appreciated your comments too Kevin ;-)

Oy no wonder i have problems w/ dial plans....

H
Post by hugolivude
Thanks Kevin, your explanation resonated better with me. Sorry for
doubting you Eric ;-)
exten => _NXXXXXX,1,Dial(Zap/1/${EXTEN})
exten => _NXXXXXXXXX,1,<do something else>
Thanks for sticking with me... Works now...
H
Post by kevin ling
Hi,
Same dial pattern on my extension.conf, But it's work great. The Asterisk
only match 7 digits number. My * version is 2.1.6.
Kevin
-----Original Message-----
Sent: Thursday, April 27, 2006 8:35 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Re: Pattern matching problem
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
Post by kevin ling
shouldn't match IMO - 6137451576 shouldn't match _NXXXXXX but that line
gets
Post by kevin ling
executed.
There was a cut/paste error with the others BTW. I thought I'd replaced
the
Post by kevin ling
defines with the actual numbers for clarity, but I made a mistake. They
are
Post by kevin ling
exten => ${LD_PATTERN},1,Dial(Zap/1/${EXTEN})
exten => ${INT_PATTERN},1,Dial(Zap/1/${EXTEN})
Thanks,
H
Post by Eric "ManxPower" Wieling
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).
Post by Eric "ManxPower" Wieling
Post by hugolivude
I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern
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
-- Executing NoOp("Zap/1-1", "Number dialed 6137451") in new
stack
Post by kevin ling
Post by Eric "ManxPower" Wieling
Post by hugolivude
-- 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!
exten => _1XXXXXXXXXX,n,Dial(Zap/1/${EXTEN})
exten => _011.,n,Dial(Zap/1/${EXTEN})
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
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Andrew Kohlsmith
2006-04-27 01:09:30 UTC
Permalink
Post by kevin ling
Same dial pattern on my extension.conf, But it's work great. The Asterisk
only match 7 digits number. My * version is 2.1.6.
From an analogue Zap channel? Bullshit.

Analogue channels do not present the extension "in one shot" -- they present
the digits one at a time, in sequence. When the dialplan matches, it
matches. Why do you think the telco needs you to enter "1" for long
distance? And why do you think they're moving to ten-digit dialing for so
many areas?

This is very very basic, standard pattern matching. Analogue channels are
very different from digital ones in how the desired extension or telephone
number is presented to the switch.

-A.
Aaron Daniel
2006-04-27 03:01:39 UTC
Permalink
Post by kevin ling
My * version is 2.1.6.
... Did I miss something?
--
Aaron Daniel
Computer Systems Technician
Sam Houston State University
***@shsu.edu
(936) 294-4198
kevin ling
2006-04-27 07:25:30 UTC
Permalink
So sorry, the correct version is 1.2.6 :-)

kevin

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Aaron Daniel
Sent: Thursday, April 27, 2006 11:02 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Re: Pattern matching problem
Post by kevin ling
My * version is 2.1.6.
... Did I miss something?

--
Aaron Daniel
Computer Systems Technician
Sam Houston State University
***@shsu.edu
(936) 294-4198
_______________________________________________
--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
kevin ling
2006-04-27 07:30:57 UTC
Permalink
Yes, you are correct.I am so sorry. I never use the zap analog card. We only
have one digium T1/E1 PCI card in our small office.

One more question, The "analogue zap channel" is fxo port? Or fxs port?

Kevin

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Andrew
Kohlsmith
Sent: Thursday, April 27, 2006 9:10 AM
To: asterisk-***@lists.digium.com
Subject: Re: [Asterisk-Users] Re: Pattern matching problem
Post by kevin ling
Same dial pattern on my extension.conf, But it's work great. The
Asterisk only match 7 digits number. My * version is 2.1.6.
Andrew Kohlsmith
2006-04-27 11:37:10 UTC
Permalink
Post by kevin ling
One more question, The "analogue zap channel" is fxo port? Or fxs port?
"Analog Zap channel" or more generally, "Analog channel" (since chan_modem,
chan_phone, and likely chan_mgcp too) means any channel technology which does
NOT present the extension as a single message.

Any technology which "streams" the numbers as they come when entering the
dialplan will behave this way. Most digital technologies (SIP, IAX, PRI,
etc.) present the extension as a single message, so Asterisk sees 10 digits
or 5 digits or however many digits you dial "all at once."

Clear as mud? :-)

-A.

kevin ling
2006-04-27 08:06:56 UTC
Permalink
Hi Andrew,

Sorry for my english first.

My configuration and hardware: AAH2.7 & 2.8, Digium TE100P, welltech 4fxo
voice gateway

SIP Phone
|
|
Asterisk Server ------------- TE100P ------------- Telcom1
|
+---- Welltech 4FXO voicegateway -------- Telcom2

Actually no matter on the digital interface (TE110P) or analog channels
(4FXO). Bellowing is my outbound routing config. I try to dial 6137451576
number. The asterisk doesn't match this dial pattern. And when I dail
"6137451". It's work.

So you mean the "analogue channels" is analog phone attach on a fxs port?

[outrt-001-outside]
include => outrt-001-outside-custom
exten => _NXXXXXX,1,Macro(dialout-trunk,1,${EXTEN},,)
exten => _NXXXXXX,n,Macro(outisbusy,)

Kevin

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Andrew
Kohlsmith
Sent: Thursday, April 27, 2006 9:10 AM
To: asterisk-***@lists.digium.com
Subject: Re: [Asterisk-Users] Re: Pattern matching problem
Post by kevin ling
Same dial pattern on my extension.conf, But it's work great. The
Asterisk only match 7 digits number. My * version is 2.1.6.
Continue reading on narkive:
Loading...