# Asterisk Project : Asterisk 13 Application_MacroIf

Created by wikibot on Aug 08, 2014

# MacroIf()

### Synopsis

Conditional Macro implementation.

### Description

Executes macro defined in macroiftrue if expr is true (otherwise macroiffalse if provided)

Arguments and return values as in application Macro()

Warning

Icon

Use of the application `WaitExten` within a macro will not function as expected. Please use the `Read` application in order to read DTMF from a channel currently executing a macro.

### Syntax

    MacroIf(expr?macroiftrue:[macroiffalse])

##### Arguments

- `expr`
- `destination`
  - `macroiftrue`
    - `macroiftrue`
    - `arg1`
  - `macroiffalse`
    - `macroiffalse`
    - `arg1`

### See Also

- Asterisk 13 Application_GotoIf
- Asterisk 13 Application_GosubIf
- Asterisk 13 Function_IF

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538