Name
IF — Conditional value selection
Synopsis
IF(expr
?[true
][:false
])
Conditional: returns the data following ?
if true, otherwise the data following
:
.
; Returns foo
exten => 123,1,Set(something=${IF($[2 > 1]?foo:bar)})
; Returns bar
exten => 123,n,Set(something=${IF($[2 < 1]?foo:bar)})