Asterisk func exists
Synopsis:
Existence Test: Returns 1 if exists, 0 otherwiseDescription:
EXISTS(<data>)This checks the existance of a string. Consider the following:
Var1=test
Var2=
EXISTS(${Var1}) = 1
EXISTS(${Var2}) = 0
If you're dynamically creating variables and need to check for their existance this function comes in really handy.
Notes
- *CLI> show function EXISTS
Return value
0 or 1Example
exten => s,1,GotoIf($[${EXISTS(${Var})}]?2:4)exten => s,2,NoOp(Variable Var (${Var}) exists!)
exten => s,3,Goto(5)
exten => s,4,NoOp(Variable Var does NOT exist!)
exten => s,5,Hangup
See also
22850 views strong.
Created by: murf, Last modification: Tue 08 of Apr, 2008 (17:57 UTC) by JustRumours
Featured -
Search:

Page Changes















