[asterisk-bugs] [Asterisk 0013249]: AEL does not translate quoted strings correctly in 1.6

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Sep 3 12:01:27 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13249 
====================================================================== 
Reported By:                dimas
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13249
Category:                   Core/PBX
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0-beta9 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-06 09:48 CDT
Last Modified:              2008-09-03 12:01 CDT
====================================================================== 
Summary:                    AEL does not translate quoted strings correctly in
1.6
Description: 
I used to use constructs like 

    a = "test here";

in the Asterisk AEL scripts. These were working fine in 1.4 (translating
to)

    Set(a=$[ "test here"])

This does not work for 1.6 anymore although translates to exactly the same
dialplan. After executing this line the value of a variable on 1.6 contains
quotes.

This results in:
1. The following construct:

    b = "${a}";
does not work at all giving parse error [Aug  6 18:01:24] WARNING[29514]:
ast_expr2.fl:437 ast_yyerror: ast_yyerror():  syntax error: syntax error,
unexpected '<token>', expecting $end; Input:

2. when the variable being assigned is CALLERID(number) - this results in
sending 

    From: ""test here"" <sip:xxxxxxxxxxx at 1.2.3.4>;tag=as1539ede1

in the SIP INVITE header. Note the double quotes. As result, the Aastra
57i phone rejects the invite with 400 Bad Request.
====================================================================== 

---------------------------------------------------------------------- 
 (0092027) murf (administrator) - 2008-09-03 12:01
 http://bugs.digium.com/view.php?id=13249#c92027 
---------------------------------------------------------------------- 
This bug is closed via svn rev 140824 in trunk, and 140886 in 1.4.
(I guess I didn't format the commit msg correctly)

URL: http://svn.digium.com/view/asterisk?view=rev&rev=140886
Log:
Merged revisions 140824 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r140824 | murf | 2008-09-03 08:01:27 -0600 (Wed, 03 Sep 2008) | 21 lines

In these changes, I have added some explanation
of changes to the Set and MSet apps, so people aren't
so shocked and surprised when they upgrade from
1.4 to 1.6.

Also, for the sake of those upgrading from 1.4 to
1.6 with AEL, I provide automatic support for the
"old" way of using Set(), that still does the
exact same old thing with quotes and backslashes
and so on as 1.4 did, by having AEL compile in the
use of MSet() instead of Set(), everywhere it inserts
this code.

But, if the app_set var is set to 1.6 or higher,
it uses the "new", non-evaluative Set().

This only usually happens if the user manually
inserts this into the asterisk.conf file, or runs
the "make samples" command.

(closes issue http://bugs.digium.com/view.php?id=13249)
Reported by: dimas
Patches:
      ael-MSet.diff uploaded by murf (license 17)
Tested by: dimas, murf
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/pbx.c
    branches/1.6.1/res/ael/ael.tab.c
    branches/1.6.1/res/ael/ael.tab.h
    branches/1.6.1/res/ael/ael.y
    branches/1.6.1/res/ael/pval.c 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-03 12:01 murf           Note Added: 0092027                          
======================================================================




More information about the asterisk-bugs mailing list