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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jul 30 06:35:01 CDT 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13197 
====================================================================== 
Reported By:                pj
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13197
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
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:              
====================================================================== 
Date Submitted:             2008-07-30 06:34 CDT
Last Modified:              2008-07-30 06:34 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]


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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-07-30 06:35 pj             Asterisk Version          => 1.4.21.1        
2008-07-30 06:35 pj             SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list