[asterisk-bugs] [JIRA] (ASTERISK-15735) All extensions are patterns (despite it does not begin with _ (underscore) if extenpatternmatchnew=yes
Sean Bright (JIRA)
noreply at issues.asterisk.org
Fri Apr 12 11:03:47 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-15735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Bright updated ASTERISK-15735:
-----------------------------------
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 at strange-context
*CLI> -- Executing [AAAS at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial AAN at strange-context
No such extension 'AAN' in context 'strange-context'
*CLI> console dial AA3 at strange-context
*CLI> -- Executing [AA3 at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial ZEBRA at strange-context
No such extension 'ZEBRA' in context 'strange-context'
*CLI> console dial 8EBRA at strange-context
*CLI> -- Executing [8EBRA at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial DONTCALL at strange-context
No such extension 'DONTCALL' in context 'strange-context'
*CLI> console dial DO4TCALL at strange-context
*CLI> -- Executing [DO4TCALL at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial EXIT at strange-context
No such extension 'EXIT' in context 'strange-context'
*CLI> console dial E8IT at strange-context
*CLI> -- Executing [E8IT at strange-context:1] Hangup("Console/default", "") in new stack
*************************************************************************
*CLI> console dial ANSWER at 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 at strange-context
*CLI> -- Executing [ANSWER at strange-context:1] Hangup("Console/default", "") in new stack
{noformat}
was:
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:
[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()
correctly read by pbx_config
*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. =-
tests:
*CLI> console dial AAAS at strange-context
*CLI> -- Executing [AAAS at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial AAN at strange-context
No such extension 'AAN' in context 'strange-context'
*CLI> console dial AA3 at strange-context
*CLI> -- Executing [AA3 at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial ZEBRA at strange-context
No such extension 'ZEBRA' in context 'strange-context'
*CLI> console dial 8EBRA at strange-context
*CLI> -- Executing [8EBRA at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial DONTCALL at strange-context
No such extension 'DONTCALL' in context 'strange-context'
*CLI> console dial DO4TCALL at strange-context
*CLI> -- Executing [DO4TCALL at strange-context:1] Hangup("Console/default", "") in new stack
*CLI> console dial EXIT at strange-context
No such extension 'EXIT' in context 'strange-context'
*CLI> console dial E8IT at strange-context
*CLI> -- Executing [E8IT at strange-context:1] Hangup("Console/default", "") in new stack
*************************************************************************
*CLI> console dial ANSWER at 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 at strange-context
*CLI> -- Executing [ANSWER at strange-context:1] Hangup("Console/default", "") in new stack
> All extensions are patterns (despite it does not begin with _ (underscore) if extenpatternmatchnew=yes
> ------------------------------------------------------------------------------------------------------
>
> Key: ASTERISK-15735
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-15735
> Project: Asterisk
> Issue Type: Bug
> Components: Core/PBX
> Reporter: jlpedrosa
> Severity: Minor
>
> 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 at strange-context
> *CLI> -- Executing [AAAS at strange-context:1] Hangup("Console/default", "") in new stack
> *CLI> console dial AAN at strange-context
> No such extension 'AAN' in context 'strange-context'
> *CLI> console dial AA3 at strange-context
> *CLI> -- Executing [AA3 at strange-context:1] Hangup("Console/default", "") in new stack
> *CLI> console dial ZEBRA at strange-context
> No such extension 'ZEBRA' in context 'strange-context'
> *CLI> console dial 8EBRA at strange-context
> *CLI> -- Executing [8EBRA at strange-context:1] Hangup("Console/default", "") in new stack
> *CLI> console dial DONTCALL at strange-context
> No such extension 'DONTCALL' in context 'strange-context'
> *CLI> console dial DO4TCALL at strange-context
> *CLI> -- Executing [DO4TCALL at strange-context:1] Hangup("Console/default", "") in new stack
> *CLI> console dial EXIT at strange-context
> No such extension 'EXIT' in context 'strange-context'
> *CLI> console dial E8IT at strange-context
> *CLI> -- Executing [E8IT at strange-context:1] Hangup("Console/default", "") in new stack
> *************************************************************************
> *CLI> console dial ANSWER at 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 at strange-context
> *CLI> -- Executing [ANSWER at strange-context:1] Hangup("Console/default", "") in new stack
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list