Can't reach some extensions named similar to dialstatus

Hi all

I’m trying to make a dialplan that takes care of every dialstatus, so i was trying to make a Goto(context,${DIALSTATUS},1)
but it does not see that extensions, also the same by dialing from console:
I can’t dial anything begining with ANS from ANSWER or even A, but other dial status are working.

*CLI> dialplan show strange-context
[ Context ‘strange-context’ created by ‘pbx_config’ ]
‘A’ => 1. HangUp() [pbx_config]
‘AAAS’ => 1. HangUp() [pbx_config]
‘AAN’ => 1. HangUp() [pbx_config]
‘ANSWER’ => 1. HangUp() [pbx_config]
‘AP’ => 1. HangUp() [pbx_config]
‘AS’ => 1. HangUp() [pbx_config]
‘BUSY’ => 1. Voicemail(demo@cospa-voicemails,b) [pbx_config]
‘CANCEL’ => 1. Voicemail(demo@voicemails,u) [pbx_config]
‘CHANUNAVAIL’ => 1. NoOp(Ese canal no existe… o tambien es cuando no esta logado) [pbx_config]
‘CONGESTION’ => 1. Voicemail(demo@voicemails,b) [pbx_config]
‘DONTCALL’ => 1. Voicemail(demo@voicemails,u) [pbx_config]
‘INVALIDARGS’ => 1. Voicemail(demo@-voicemails,u) [pbx_config]
‘NOANSWER’ => 1. Voicemail(demo@voicemails,u) [pbx_config]
‘TORTURE’ => 1. Voicemail(demo@voicemails,u) [pbx_config]
‘answer’ => 1. HangUp() [pbx_config]
‘i’ => 1. Hangup() [pbx_config]
‘sANSWE’ => 1. HangUp() [pbx_config]
’_XXXXX’ => 1. Dial(SIP/${EXTEN}) [pbx_config]
2. NoOp(DIALSTATUS=${DIALSTATUS}) [pbx_config]
3. Goto(extrange-context,${DIALSTATUS},1) [pbx_config]

-= 18 extensions (20 priorities) in 1 context. =-

*CLI> console dial A@strange-context
*CLI> – Executing [A@strange-context:1] Hangup(“Console/default”, “”) in new stack
*CLI> console dial AAAS@strange-context
*CLI> – Executing [AAAS@strange-context:1] Hangup(“Console/default”, “”) in new stack
*CLI> console dial AAN@strange-context
No such extension ‘AAN’ in context ‘strange-context’
*CLI> console dial DONTCALL@strange-context
No such extension ‘DONTCALL’ in context ‘strange-context’
*CLI> console dial CANCEL@strange-context
No such extension ‘CANCEL’ in context ‘strange-context’
*CLI> console dial ANSWER@strange-context
No such extension ‘ANSWER’ in context ‘strange-context’
*CLI> console dial INVALIDARGS@strange-context
No such extension ‘INVALIDARGS’ in context ‘strange-context’

*CLI> console dial BUSY@strange-context
*CLI> – Executing [BUSY@strange-context:1] VoiceMail(“Console/default”, “demo@cospa-voicemails,b”) in new stack

[quote=“http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns”]
Special Characters for Pattern Matching
X matches any digit from 0-9
Z matches any digit from 1-9
N matches any digit from 2-9
[1237-9] matches any digit or letter in the brackets
(in this example, 1,2,3,7,8,9)
[a-z] matches any lower case letter (introduced in which Asterisk version?)
[A-Z] matches any UPPER case letter (introduced in which Asterisk version?)
. wildcard, matches one or more characters
! wildcard, matches zero or more characters immediately
(only Asterisk 1.2 and later, see note) [/quote]
Make sure that N is not a pattern matcher in your extensions.
Try to dial A3SWER. Does it work ?

Hi!

You’re completely right:

*CLI> console dial A3SWER@strange-context
*CLI> – Executing [A3SWER@strange-context:1] Hangup(“Console/default”, “”) in new stack

it’s acting like a pattern and but his extensions are NOT begining with underscore. I Quote the same page you just quoted before, the paragraph above:

It’s a a bug? an error in documentation at VoIp Info?

This is an official information placed in samples.

Since demo extensions where not begining whith _ it’s not right, so … what are you saying? It’s a bug on asterisk documentation or a bug on asterisk itself

[quote=“fdragowski”][quote=“asterisk-1.6.2.5 extensions.conf.sample”]
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a ‘_’
; character, it is interpreted as a pattern rather than a
; literal. In patterns, some characters have special meanings:

;
; X - any digit from 0-9
; Z - any digit from 1-9
; N - any digit from 2-9
; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
; . - wildcard, matches anything remaining (e.g. _9011. matches
; anything starting with 9011 excluding 9011 itself)
; ! - wildcard, causes the matching process to complete as soon as
; it can unambiguously determine that no other matches are possible
;
; For example, the extension _NXXXXXX would match normal 7 digit dialings,
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceded by a one.
[/quote]
This is an official information placed in samples.[/quote]

N,Z,X are reserved words or reserved variables, Call it what you want, but you can’t use them like in C you can not use FOR WHILE etc.

Hi

Ok, Not sure what version you are using if its 1.6 we dont use that as its not a LTS version but in 1.4.29.1

exten => ANN,1,Noop(${EXTEN}) will match to ONLY ANN
exten => _ANN,1,Noop(${EXTEN}) will match to A22 to A99

which is as expected

Ian

Yep, it’s asterisk 1.6.2.2 I can go to lowercase and there wont be a problem, do you want me to let it be or post a bug or something?

Hi

Have you read the CHANGELOG and the upgrade notes? Something may have changed. If not then Post a bug.

Ian

If you want to do pattern matches with literal uppercase characters, you need to do something like:

_[A][N][S][W][E][R].

This is not a bug.

David55:

Problem is, that in the dialplan there were no underscore (_) at extension so it shouldn’t behave like a pattern, should be a exact match. So it’s a bug in doc or in asterisk.

I agree with jlpedrosa and as I showed it does work as expected in 1.4.29 so it may be bug in 1.6.

and interesting test would be to see if extensiions EXIT and ZEBRA work That will show if its just an issue with the N or a more general error

Ian

[quote=“ianplain”]I agree with jlpedrosa and as I showed it does work as expected in 1.4.29 so it may be bug in 1.6.

and interesting test would be to see if extensiions EXIT and ZEBRA work That will show if its just an issue with the N or a more general error

Ian[/quote]

[b]dialplan:

[strange-context][/b]
exten => CHANUNAVAIL,1,HangUp()
exten => CONGESTION,1,HangUp()
exten => NOANSWER,1,HangUp()
exten => BUSY,1,HangUp()
exten => ANSWER,1,HangUp()
exten => CANCEL,1,HangUp()
exten => DONTCALL,1,HangUp()
exten => TORTURE,1,HangUp()
exten => INVALIDARGS,1,HangUp()
exten => sANSWE,1,HangUp()
exten => answer,1,HangUp()
exten => A,1,HangUp()
exten => AP,1,HangUp()
exten => AAN,1,HangUp()
exten => AS,1,HangUp()
exten => AAAS,1,HangUp()
exten => AAAS,1,HangUp()
exten => ZEBRA,1,HangUp()
exten => EXIT,1,HangUp()

[b]
correctly read by pbx_config

*CLI> dialplan show strange-context[/b]
[ Context ‘strange-context’ created by ‘pbx_config’ ]
‘A’ => 1. HangUp() [pbx_config]
‘AAAS’ => 1. HangUp() [pbx_config]
‘AAN’ => 1. HangUp() [pbx_config]
‘ANSWER’ => 1. HangUp() [pbx_config]
‘AP’ => 1. HangUp() [pbx_config]
‘AS’ => 1. HangUp() [pbx_config]
‘BUSY’ => 1. HangUp() [pbx_config]
‘CANCEL’ => 1. HangUp() [pbx_config]
‘CHANUNAVAIL’ => 1. HangUp() [pbx_config]
‘CONGESTION’ => 1. HangUp() [pbx_config]
‘DONTCALL’ => 1. HangUp() [pbx_config]
‘EXIT’ => 1. HangUp() [pbx_config]
‘INVALIDARGS’ => 1. HangUp() [pbx_config]
‘NOANSWER’ => 1. HangUp() [pbx_config]
‘TORTURE’ => 1. HangUp() [pbx_config]
‘ZEBRA’ => 1. HangUp() [pbx_config]
‘answer’ => 1. HangUp() [pbx_config]
‘i’ => 1. Hangup() [pbx_config]
‘sANSWE’ => 1. HangUp() [pbx_config]

-= 19 extensions (19 priorities) in 1 context. =-

tests:
[b]*CLI> console dial AAAS@strange-context
*CLI> – Executing [AAAS@strange-context:1] Hangup(“Console/default”, “”) in new stack

*CLI> console dial AAN@strange-context
No such extension ‘AAN’ in context ‘strange-context’

*CLI> console dial AA3@strange-context
*CLI> – Executing [AA3@strange-context:1] Hangup(“Console/default”, “”) in new stack

*CLI> console dial ZEBRA@strange-context
No such extension ‘ZEBRA’ in context ‘strange-context’

*CLI> console dial 8EBRA@strange-context
*CLI> – Executing [8EBRA@strange-context:1] Hangup(“Console/default”, “”) in new stack

*CLI> console dial DONTCALL@strange-context
No such extension ‘DONTCALL’ in context ‘strange-context’

*CLI> console dial DO4TCALL@strange-context
*CLI> – Executing [DO4TCALL@strange-context:1] Hangup(“Console/default”, “”) in new stack

*CLI> console dial EXIT@strange-context
No such extension ‘EXIT’ in context ‘strange-context’

*CLI> console dial E8IT@strange-context
*CLI> – Executing [E8IT@strange-context:1] Hangup(“Console/default”, “”) in new stack[/b]

Is this enough?

1.6.2.2 probably updating to 1.6.2.5 this afternoon

Hi all

I narrowed the ‘BUG’, it only happens with extenpatternmatchnew set at true.

*CLI> console dial ANSWER@strange-context
No such extension ‘ANSWER’ in context ‘strange-context’
*CLI> dialplan set extenpatternmatchnew false
– Switched to using the OLD pattern match algorithm for extension names in the dialplan.
*CLI> console dial ANSWER@strange-context
*CLI> – Executing [ANSWER@strange-context:1] Hangup(“Console/default”, “”) in new stack

I haven’t seen anything on CHANGELOG… should I post a bug?

Hi

issues.asterisk.org/view.php?id=14615
and
reviewboard.asterisk.org/r/194/

was closed some time ago and related to what you have, you need to check your version as it may be prior to the fix.

One of you may want to note that issues.asterisk.org/view.php?id=16951 is a duplicate, then!

I posted that just in case it’s not the same, and update information on possible duplicated

[quote=“ianplain”]Hi

issues.asterisk.org/view.php?id=14615
and
reviewboard.asterisk.org/r/194/

was closed some time ago and related to what you have, you need to check your version as it may be prior to the fix.[/quote]

it’s merged into revision 188904 on 1.6.2 ,but more than 10 moths ago, test environment is 1.6.2.2 which was relased on 02-Feb-2010.
So i’m afraid it wasn’t really fixed?

Thanks