[Home]

Summary:ASTERISK-13298: [patch] functions with multiple arguments do not work in AEL dialplan
Reporter:Timo Teräs (fabled)Labels:
Date Opened:2009-01-05 00:20:17.000-0600Date Closed:2009-01-15 15:23:20.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) function-argument-separator-fix.diff
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.
Comments:By: Leif Madsen (lmadsen) 2009-01-05 13:12:24.000-0600

This parsing/AEL issue assigned to murf. Thanks!

By: Digium Subversion (svnbot) 2009-01-15 14:55:00.000-0600

Repository: asterisk
Revision: 168737

U   trunk/main/ast_expr2.c
U   trunk/main/ast_expr2.h
U   trunk/main/ast_expr2.y

------------------------------------------------------------------------
r168737 | murf | 2009-01-15 14:54:59 -0600 (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 ASTERISK-13298)
Reported by: fabled
Patches:
     function-argument-separator-fix.diff uploaded by fabled (license 448)


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

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

By: Digium Subversion (svnbot) 2009-01-15 15:14:32.000-0600

Repository: asterisk
Revision: 168738

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

------------------------------------------------------------------------
r168738 | murf | 2009-01-15 15:14:31 -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 ASTERISK-13298)
 Reported by: fabled
 Patches:
       function-argument-separator-fix.diff uploaded by fabled (license 448)
........

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

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

By: Digium Subversion (svnbot) 2009-01-15 15:23:19.000-0600

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 ASTERISK-13298)
 Reported by: fabled
 Patches:
       function-argument-separator-fix.diff uploaded by fabled (license 448)
........

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

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