Asterisk func if

Synopsis

Conditional: Returns the data following '?' if true else the data following ':'

Description

IF(<expr>?[<true>][:<false>])


Notes

  • *CLI> show function IF
  • Resides in func_logic.so module

Return value

Returns the resulting string.

Example

  exten => s,1,Set(foo=${IF($[ ${x} = 7]?tval:fval)})


See also




Synopsis

Conditional: Returns the data following '?' if true else the data following ':'

Description

IF(<expr>?[<true>][:<false>])


Notes

  • *CLI> show function IF
  • Resides in func_logic.so module

Return value

Returns the resulting string.

Example

  exten => s,1,Set(foo=${IF($[ ${x} = 7]?tval:fval)})


See also




Created by: murf, Last modification: Wed 13 of Jun, 2012 (05:26 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+