The Xtend IVR
Scripting language is simple to learn, flexible to implement and easy to code.
The inherent technical complexity of creating an IVRS has been completely eliminated
by the introduction of simple high level Telephony commands. Programmers can develop
and deploy powerful IVR Solutions in less than a day. This Rapid Application Development
capability of Xtend IVR combined with the flexibility of the Scripting language
enables fast deployment of IVR solutions.
Program Flow and Structure
The Xtend IVR script revolves
around these basic steps:
Program Flow and Structure
The Xtend IVR script revolves around these basic steps:
All variables in the Xtend IVR scripting language are internally stored as strings. However, when a numeric operation (like addition or subtraction) is performed on a variable the contents of the variable would be taken as a signed integer and the numeric operation is performed.
All variable names starting with a $ symbol, are not case sensitive and can be of any length. Alphabets, numbers and underscores can be used in a variable name. However, a variable cannot start with a number or underscore. Since variable is not typed, pre-declaration of the variable is not required. A variable can be directly used and would contain an initial value of "".
These are some valid Xtend IVR variable names:
These are some invalid Xtend IVR variable names:
- $3Times (Cannot begin with a digit/number)
- $try? (only "_" and "." are valid in a variable name)
Operators & Expressions in Xtend IVR
Xtend IVR supports the following operators
+ Addition - Subtraction * Multiplication / Division = Assignment += Additive assignment -= Subtractive assignment
= Equality (same symbol as assignment (above)) == Equality != Inequality <> Inequality < Lesser than > Greater than <= Lesser than or equal to >= Greater than or equal to
& AND | OR ^ XOR << Shift bits to left >> Shift bits to the right
"$" can be used as a macro operator to access a variable value inside variable. This can be used to iterate through multiple variables, for example, assume $abc = 5 and $def = "$abc". Then the value of $$def is 5.
Expressions are statements containing variables, constants, functions and operators. Xtend IVR allows all standard expressions to be implemented directly in the script. Some of the valid expressions are:
$Val = 3
$Result = $Num1 + $Num2
$Per = ($curr/$Max) * 100
$Inc += 1
Labels are named locations in the script. You can use the Goto command to redirect script execution to a specified label. In Xtend IVR labels must start or end with a colon.
Examples of valid labels are:
Some invalid labels are:
The labels given below will be executed when specific events (like line disconnect) happen.
This label is executed when a critical system error occurs. Usually this means that Xtend IVR is unable to continue execution of the script. Examples where this can happen include attempting to play a file that is not present in the system, internal engine errors, attempting to use Speech Recognition or text-to-speech when SAPI is not installed etc.
This label is executed when the remote party disconnects the phone line. This label is not called when the script executes hangup. Useful to determine if the remote party hung-up the call.
This label is executed when the Timeout command is in use and the script has exceeded the time allocated for it while in a call. This is quite useful to specify that a user should not exceed an allocated time. The Timeout command can be used as and when needed to increase or decrease the specified time.
Legacy plugins executed via the Run command have a RunTimeout command to specify how long the script should wait for the program to exit. If legacy plugins are not being used. This section is not required.
See Also Commands, Functions