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

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Nov 1 12:37:18 CDT 2007


The following issue has been CLOSED 
====================================================================== 
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:                     closed
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:              
Resolution:                 reopened
Fixed in Version:           
====================================================================== 
Date Submitted:             09-21-2007 04:49 CDT
Last Modified:              11-01-2007 12:37 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 - 11-01-07 12:37  
---------------------------------------------------------------------- 
Sorry, I've been thinking about for a while, and I'm going to close it.
But, on the other hand, I'm open to this as an enhancement request against
trunk. So, while I will close this bug, feel free to file another bug and
request optional arguments for macros.

Here are some facts/reasons around these issues:

1. This has definitely turned into an enhancement request, and it's
against 1.4, which will not allow enhancements.
2. Anything we do here with macro args will reflect back on Gosub in
trunk, so the two have to be coordinated.
3. The names we use as arguments in trunk, are local variable names. They
will disappear when the macro (gosub) returns. They will not be visible to
macro invocations from the macro.
4. I prefer NOT to use tricks in underlying app calls, because from
release to release, 'tricks' often end up being labeled as 'bugs' and
getting fixed. And that then breaks the cool feature that people grew to
depend on.
5. There are certain issues that must be worked out with "optional" args, 
for a practical implementation. For instance, if an arg is not included,
what value will it take in the called macro? Perhaps if we think about
'default args' instead of 'optional args', it might bear more fruit. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-01-07 12:37  murf           Status                   feedback => closed  
11-01-07 12:37  murf           Note Added: 0072904                          
======================================================================




More information about the asterisk-bugs mailing list