Summary:ASTERISK-06900: [patch] ExecIf() should use pbx_checkcondition instead of ast_true
Reporter:Gareth Palmer (gareth)Labels:
Date Opened:2006-05-04 23:54:54Date Closed:2006-05-11 18:18:05
Versions:Frequency of
Environment:Attachments:( 0) app_macro.c.patch
( 1) app_while.c.patch
( 2) func_logic.c.patch
Description:Because ExecIf uses ast_true expressions like...

 ExecIf($["foo" : "foo"],NoOp,Hello World)

..will not cause the NoOp command to execute as the result (3) is false according to ast_true.

Similarly "ja", "oui" and "si" are all considered false but "yes" is true.

Switching ExecIf, While & MacroIf to use pbx_checkcondition will make their behaviour like that of GotoIf.

Comments:By: Russell Bryant (russell) 2006-05-05 09:59:01

Added to the 1.2 branch and the trunk in revisions 24837 and 24838, thanks!

By: Gareth Palmer (gareth) 2006-05-11 16:42:39

I missed an instance of the same behaviour with the IF() function. Patch attached.

By: Tilghman Lesher (tilghman) 2006-05-11 18:18:05

Fixed in 1.2 and trunk.  In the future, please open a new bug, no matter how similar the change.  Reopen closed bugs only when there's a problem with the patch that was applied.