Summary: | ASTERISK-15735: All extensions are patterns (despite it does not begin with _ (underscore) if extenpatternmatchnew=yes | ||
Reporter: | jlpedrosa (jlpedrosa) | Labels: | |
Date Opened: | 2010-03-03 04:02:13.000-0600 | Date Closed: | 2019-04-12 11:05:46 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/PBX |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Hi all
In a standart dialplan if you put extension not begining with _, any uppercase N,Z or X is matching digits, instead the letter itself if you set extenpatternmatchnew=yes You can see the full stuff on the forum: http://forums.digium.com/viewtopic.php?f=1&t=73261&p=142393&sid=6718ff206e5dea345023a33fb83ba6cb#p142393 anway here is the essential: dialplan: {noformat} [strange-context] 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() {noformat} correctly read by pbx_config {noformat} *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. 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. =- {noformat} tests: {noformat} *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 ************************************************************************* *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 {noformat} | ||
Comments: | By: jlpedrosa (jlpedrosa) 2010-03-03 07:17:16.000-0600 possible duplicated: https://issues.asterisk.org/view.php?id=14615 marked as closed but still not woriking on 1.6.2.2 have a look at forum for full details http://forums.digium.com/viewtopic.php?f=1&t=73261&p=142401 By: Mark Michelson (mmichelson) 2010-03-03 13:57:39.000-0600 I would be willing to assert that this is a regression because at the time that I closed issue ASTERISK-13704, this was not happening. If you look at the code review posted here, https://reviewboard.asterisk.org/r/194/, you'll see that my test cases included examples like yours (specifically the 'NNN' case) and that at the time they were working. Admittedly, at the time that I was working on ASTERISK-13704, I was not testing in the 1.6.2 branch. It is possible that I missed something when merging to that branch. I think it's more likely that a more recent revision has undone the changes I originally made. I'll take a look into this and see what I can find. By: Mark Michelson (mmichelson) 2010-03-03 14:53:34.000-0600 A short experiment seems to show that it likely was a merging error on my part that made this happen in 1.6.2. Your context works just fine in Asterisk trunk right now. It appears that the merges to the 1.6 branches were clean but some necessary details were left out. By: Mark Michelson (mmichelson) 2010-03-03 15:12:28.000-0600 Ah, I see what the issue is. I *blocked* that change from going into the 1.6.X branches instead of merging the change. That certainly explains why you would see the problem there. By: jlpedrosa (jlpedrosa) 2010-03-04 09:30:15.000-0600 Hi mmichelson. You did the hardest! and blocked it. are you going to provide a patch? will be merged soon? Anyay I can solve it on my side easily going lowercase. What is your advice? Thanks!! By: Sean Bright (seanbright) 2019-04-12 11:05:47.006-0500 This is working properly in Asterisk 13, which is currently the oldest supported version of Asterisk. |