[asterisk-bugs] [Asterisk 0013197]: STAT() inside IF() doesn't work

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jul 30 16:54:00 CDT 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13197 
====================================================================== 
Reported By:                pj
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13197
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.4.21.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-07-30 06:34 CDT
Last Modified:              2008-07-30 16:54 CDT
====================================================================== 
Summary:                    STAT() inside IF() doesn't work
Description: 
${STAT(e,/tmp/test.txt)} 
returns 1 if called from NoOP, but when is inside IF, it returns zero,
when ael is compiled, you can see weird thing, that STAT has separator
'pipe' when is in NoOP, but has 'comma' when is inside IF()
this issue has workaround: if use 'pipe' instead of 'comma' in ael
dialplan, but it's inconsistent what is said in STAT() help
svn trunk doesn't have this issue.

simple ael dialplan test:

  995 => {
        NoOP(test file ${STAT(e,/tmp/test.txt)});
        if (${STAT(e,/tmp/test.txt)})
         NoOP(file exist);
        else
         NoOP(does not exist);
        Congestion;
  }


compiled:
  '995' =>          1. NoOP(test file ${STAT(e|/tmp/test.txt)})  
[pbx_ael]
                    2. GotoIf($[${STAT(e,/tmp/test.txt)}]?3:5)   
[pbx_ael]
                    3. NoOP(file exist)                          
[pbx_ael]
                    4. Goto(6)                                   
[pbx_ael]
                    5. NoOP(does not exist)                      
[pbx_ael]
                    6. NoOp(Finish if-zamestnanci-169)           
[pbx_ael]
                    7. Congestion()                              
[pbx_ael]


======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013051 SIPPEER isn't working inside REGEX and IF
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-07-30 16:54 svnbot         Status                   assigned => resolved
2008-07-30 16:54 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list