[asterisk-bugs] [Asterisk 0012467]: Can't add 0 in front of function result within if() block of AEL

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Apr 21 16:07:43 CDT 2008


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12467 
====================================================================== 
Reported By:                atis
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   12467
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-17-2008 08:23 CDT
Last Modified:              04-21-2008 16:07 CDT
====================================================================== 
Summary:                    Can't add 0 in front of function result within if()
block of AEL
Description: 
I'm trying to construct syntax that will allow to use function result
directly in mathematical expression, and in case if function result is
empty (NULL), interpret that as 0. This works fine from .conf file or
realtime table:

Set(calls_missed_queue=$[0${DB(agent_globals/${target_num}/calls_missed_queue_${call_from_queue})}+1])

Here's the line from AEL that doesn't work:

if
(${GROUP_COUNT(${target_num}@agent_queue_b)}=1+0${DB(skip_group/${target_num}/agent_queue_b)});

Seems that there's no way how to use this within if() check directly, it
returns error at AEL compile time ("aelparse -d -n -w -q extensions.ael")




====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 04-21-08 16:07  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 114423

U   trunk/CHANGES
U   trunk/doc/tex/ael.tex
U   trunk/doc/tex/channelvariables.tex
U   trunk/main/ast_expr2.c
U   trunk/main/ast_expr2.fl
U   trunk/main/ast_expr2.h
U   trunk/main/ast_expr2.y
U   trunk/main/ast_expr2f.c
A   trunk/pbx/ael/ael-test/ael-ntest24/
A   trunk/pbx/ael/ael-test/ael-ntest24/extensions.ael
U   trunk/pbx/ael/ael-test/ref.ael-ntest10
A   trunk/pbx/ael/ael-test/ref.ael-ntest24
U   trunk/pbx/ael/ael-test/ref.ael-test1
U   trunk/pbx/ael/ael-test/ref.ael-test18
U   trunk/pbx/ael/ael-test/ref.ael-test19
U   trunk/pbx/ael/ael-test/ref.ael-test3
U   trunk/pbx/ael/ael-test/ref.ael-test5
U   trunk/pbx/ael/ael-test/ref.ael-test8
U   trunk/pbx/ael/ael-test/ref.ael-vtest13
U   trunk/pbx/ael/ael-test/ref.ael-vtest17

------------------------------------------------------------------------
r114423 | murf | 2008-04-21 16:07:41 -0500 (Mon, 21 Apr 2008) | 13 lines

(closes issue http://bugs.digium.com/view.php?id=12467)
Reported by: atis
Tested by: murf

This upgrade adds the ~~ (concatenation) string operator to expr2.
While not needed in normal runtime pbx operation, it is needed when
raw exprs are being syntax checked. This plays into future syntax-
unification plans. By permission of atis, this addition in trunk 
and the reason of why things are as they are will suffice to close
this bug.



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

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-21-08 16:07  svnbot         Note Added: 0085772                          
04-21-08 16:07  svnbot         Status                   feedback => assigned
======================================================================




More information about the asterisk-bugs mailing list