[asterisk-bugs] [Asterisk 0010787]: Impossible to make optional macro arguments in 1.4

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Oct 5 15:44:39 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10787 
====================================================================== 
Reported By:                Luke-Jr
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   10787
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-21-2007 04:49 CDT
Last Modified:              10-05-2007 15:44 CDT
====================================================================== 
Summary:                    Impossible to make optional macro arguments in 1.4
Description: 
In 1.2, AEL didn't validate macro argument counts, and all was well. Now
AEL errors if they don't have the same number, which means macros are
forced to have a fixed number of arguments ?
====================================================================== 

---------------------------------------------------------------------- 
 murf - 10-05-07 15:44  
---------------------------------------------------------------------- 
Jsmith just sent me this pastebin:
( I am constantly in awe of his wickedly composed examples!!)


      [lab]
      exten => 211,1,Macro(argtest,one,two,three,four,five)
      exten => 211,n,Macro(argtest,1,2,3,4)
       
      [macro-argtest]
      exten => s,1,NoOp(${ARG1}:${ARG2}:${ARG3}:${ARG4}:${ARG5}:${ARG6})
      exten => s,n,Macro(argtest2,a,b,c)
       
      [macro-argtest2]
      exten => s,1,NoOp(${ARG1}:${ARG2}:${ARG3}:${ARG4}:${ARG5}:${ARG6})

      
      hockey*CLI> dial 211 at lab
          -- Executing [211 at lab:1] Macro("ALSA/default",
"argtest|one|two|three|four|five") in new stack
          -- Executing [s at macro-argtest:1] NoOp("ALSA/default",
"one:two:three:four:five:") in new stack
          -- Executing [s at macro-argtest:2] Macro("ALSA/default",
"argtest2|a|b|c") in new stack
          -- Executing [s at macro-argtest2:1] NoOp("ALSA/default",
"a:b:c:four:five:") in new stack
          -- Executing [211 at lab:2] Macro("ALSA/default",
"argtest|1|2|3|4") in new stack
          -- Executing [s at macro-argtest:1] NoOp("ALSA/default",
"1:2:3:4::") in new stack
          -- Executing [s at macro-argtest:2] Macro("ALSA/default",
"argtest2|a|b|c") in new stack
          -- Executing [s at macro-argtest2:1] NoOp("ALSA/default",
"a:b:c:4::") in new stack
        == Auto fallthrough, channel 'ALSA/default' status is 'UNKNOWN'
       << Hangup on console >> 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-05-07 15:44  murf           Note Added: 0071563                          
======================================================================




More information about the asterisk-bugs mailing list