Page 532 - Asterisk™: The Future of Telephony
P. 532
IF Conditional value selection
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)})
See Also
GotoIf()
IFTIME Compares the current system time to a time specification
IFTIME(times,days_of_week,days_of_month,months?[true][:false])
Conditional: Returns the data following ? if true, otherwise the data following :
times
Time ranges, in 24-hour format
days_of_week
Days of the week (mon, tue, wed, thu, fri, sat, sun)
days_of_month
Days of the month (1–31)
months
Months (jan, feb, mar, apr, etc.)
See Also
GotoIfTime()
ISNULL Checks if a value is blank
ISNULL(data)
Returns 1 if data is blank or 0 otherwise.
See Also
LEN(), EXISTS()
KEYPADHASH Converts letters into numbers
KEYPADHASH(string)
504 | Appendix E: Asterisk Dialplan Functions