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)})
Another Example
exten => s,1,Set(mycid=${IF($[ ${CALLERID(num)} =102]?tval:fval)})
same=>n,Noop( value of ${mycid})
if caller id is 100 value of ${mycid} is tval if not is fval
No hay comentarios:
Publicar un comentario