[asterisk-bugs] [Asterisk 0014169]: [patch] functions with multiple arguments do not work in AEL dialplan

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jan 15 15:23:19 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14169 
====================================================================== 
Reported By:                fabled
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   14169
Category:                   Core/Configuration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 167171 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-01-05 00:20 CST
Last Modified:              2009-01-15 15:23 CST
====================================================================== 
Summary:                    [patch] functions with multiple arguments do not
work in AEL dialplan
Description: 
I had in my extensions.ael:
_XXX! => {
	count=ENUMLOOKUP(${EXTEN},ALL,c,,enum.mydomain.tld);
	Noop(${count});
};

And it did not work. First the parser complained about ",," it expected to
get a token before comma. So I workaround by adding a zero as dummy
argument.

Then I got error messages that it tried to do enum lookup for number
"12345|ALL|c|0|enum.mydomain.tld". Obviously the argument parser
restructured the dots to pipes.

The dot conversion I was able to fix with attached patch.
====================================================================== 

---------------------------------------------------------------------- 
 (0097971) svnbot (reporter) - 2009-01-15 15:23
 http://bugs.digium.com/view.php?id=14169#c97971 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 168739

_U  branches/1.6.1/
U   branches/1.6.1/main/ast_expr2.c
U   branches/1.6.1/main/ast_expr2.h
U   branches/1.6.1/main/ast_expr2.y

------------------------------------------------------------------------
r168739 | murf | 2009-01-15 15:23:19 -0600 (Thu, 15 Jan 2009) | 22 lines

Merged revisions 168737 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r168737 | murf | 2009-01-15 13:54:59 -0700 (Thu, 15 Jan 2009) | 16 lines
  
  This patch allows null args in ast_expr2 func calls, and fixes commas
being converted to pipes, which was 1.4 type stuff.
  
  If the user says count=ENUMLOOKUP(${EXTEN},ALL,c,,enum.mydomain.tld);
  
  then it won't complain about the empty arg (c,,...) and fabled's patch
  won't let it swap the commas for pipes.
  
  Ran it thru my dialplan and no complaints.
  
  
  (closes issue http://bugs.digium.com/view.php?id=14169)
  Reported by: fabled
  Patches:
        function-argument-separator-fix.diff uploaded by fabled (license
448)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168739 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-15 15:23 svnbot         Checkin                                      
2009-01-15 15:23 svnbot         Note Added: 0097971                          
======================================================================




More information about the asterisk-bugs mailing list