Summary:ASTERISK-16751: macro does not match Goto extension s-NOANSWER when extenpatternmatchnew=yes
Reporter:mdeneen (mdeneen)Labels:
Date Opened:2010-09-29 12:48:52Date Closed:
Versions:Frequency of
is duplicated byASTERISK-17695 extenpatternmatchnew=yes cannot find extensions with '-' in them
is duplicated byASTERISK-22684 extenpatternmatchnew doesn't match extensions that contain '-'
Environment:Attachments:( 0) macro-fallthrough.log
( 1) macro-nomatch.log
Description:With the following macro:

[ Context 'macro-stdexten' created by 'pbx_config' ]
 's' =>            1. GotoIf($["${MACRO_EXTEN}" = "${CALLERID(num)}"]?callself) [pbx_config]
                   2. GotoIf($["${VMCOUNT(${ARG1})}" != "0"]?vm) [pbx_config]
                   3. GotoIf($["${VMCOUNT(${ARG1})}" = "0"]?novm) [pbx_config]
    [vm]           4. SendText(You have voicemail messages)      [pbx_config]
    [novm]         5. Dial(${ARG2},17,tTr)                       [pbx_config]
                   6. Goto(s-${DIALSTATUS},1)                    [pbx_config]
    [callself]     7. Wait(2)                                    [pbx_config]
                   8. VoiceMailMain(${ARG1})                     [pbx_config]
                   9. Hangup()                                   [pbx_config]
 's-BUSY' =>       1. Voicemail(b${ARG1})                        [pbx_config]
                   2. Hangup()                                   [pbx_config]
 's-CHANUNAVAIL' => 1. Voicemail(u${ARG1})                        [pbx_config]
                   2. Hangup()                                   [pbx_config]
 's-CONGESTION' => 1. Congestion()                               [pbx_config]
                   2. Hangup()                                   [pbx_config]
 's-NOANSWER' =>   1. Voicemail(u${ARG1})                        [pbx_config]
                   2. Hangup()                                   [pbx_config]

a Goto to s-NOANSWER does not match when extenpatternmatchnew=yes, but does with extenpatternmatchnew=no.  Here is the console output:

 == Using SIP RTP CoS mark 5
   -- Executing [2612@from-sip-internal:1] Macro("SIP/2611-00000019", "stdexten,2612,SIP/2612") in new stack
   -- Executing [s@macro-stdexten:1] GotoIf("SIP/2611-00000019", "0?callself") in new stack
   -- Executing [s@macro-stdexten:2] GotoIf("SIP/2611-00000019", "0?vm") in new stack
   -- Executing [s@macro-stdexten:3] GotoIf("SIP/2611-00000019", "1?novm") in new stack
   -- Goto (macro-stdexten,s,5)
   -- Executing [s@macro-stdexten:5] Dial("SIP/2611-00000019", "SIP/2612,17,tTr") in new stack
 == Using SIP RTP CoS mark 5
   -- Called 2612
   -- SIP/2612-0000001a is ringing
   -- Nobody picked up in 17000 ms
   -- Executing [s@macro-stdexten:6] Goto("SIP/2611-00000019", "s-NOANSWER,1") in new stack
   -- Goto (macro-stdexten,s-NOANSWER,1)
   -- Auto fallthrough, channel 'SIP/2611-00000019' status is 'NOANSWER'


http://pastebin.com/raw.php?i=f3N4yWG5  (raw output listed in the description)

http://pastebin.com/raw.php?i=pEsZRXfY  (raw output from a similar macro containing a _s-. pattern, with both extenpatternmatchnew=yes and extenpatternmatchnew=no)
Comments:By: Russell Bryant (russell) 2010-09-29 17:32:31

Thanks for the report!  

(Just as a note to self, externpatternmatchnew is not yet enabled by default in any existing version.)

By: Leif Madsen (lmadsen) 2010-10-05 09:32:20

I also think it'd be ideal that you attach the output as a text file and not as a pastebin which could potentially be lost.

By: mdeneen (mdeneen) 2010-10-05 11:48:09

added log files as attachments