Summary: | ASTERISK-12612: AEL parser should trim RHS of an assignment | ||
Reporter: | Dmitry Andrianov (dimas) | Labels: | |
Date Opened: | 2008-08-18 18:33:51 | Date Closed: | 2011-06-07 14:02:39 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | PBX/pbx_ael |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | When AEL parser parses assignments like a = 123; into Set(a=$[ 123]); that is keeping the leading spaces after assignment operator. IMHO the leading spaces should be removed: Set(a=$[123]); If one needs to start value with a space, he/she could quote it like: a = " 123"; | ||
Comments: | By: Dmitry Andrianov (dimas) 2008-08-20 12:27:45 Btw, I believe trailing spaces should be trimmed as well so a = 123 ; translates into Set(a=$[123]) instead of Set(a=$[ 123 ]) By: Steve Murphy (murf) 2008-09-08 15:27:55 I tried this both in 1.4, and in trunk with app_set=1.6 set, and not set, and I do not see the problem. With this in my extensions.ael file: my_ext => { a= 123 ; NoOp(a is '${a}' Isn't it wonderful?); } the generated .conf code: '842' => 1. Set(a=$[ 123 ]) [pbx_ael] 2. NoOp(a is '${a}' Isn't it wonderful?) [pbx_ael] I see this at run time on the console: -- Executing [842@extension:1] Set("SIP/snom360-082bbb88", "a=123") in new stack -- Executing [842@extension:2] NoOp("SIP/snom360-082bbb88", "a is '123' Isn't it wonderful?") in new stack The spaces are filtered out by the $[...] expression. I'm going to close this bug, but if you feel I have missed the issue, please re-open and give me more specifics about your configuration. Does your asterisk.conf have a [compat] section with app_set=1.6? |