Add Variable
Add Variable
Adds a value to an existing variable.
Many Action Scripts (e.g. Gosub, If) rely on the value of Variables to control the flow of a call.
You can add a decimal value to an existing variable by specifying a positive integer or decimal value in the 'Value' field.
You can subtract a value from the variable by entering a negative (-ve) integer or decimal value in the 'Value' field.
The value may also be taken from another variable allow you to add two variables together.
VariableÂ
The name of the Type and name of the Variable that we want to modify. The variable must already exist in the flow of route steps before this step is ran.
The drop list selects the 'variable type' whilst the text field allows you to enter the name of the variable you want to modify.
Variable Type
Indicates the Type of the Variable.
Route Variable
The standard Routes Variable type that most Action Scripts require to operate. These variables cease to exist when the call stops and are not accessible by other calls.
Asterisk Variable
The Variable is to be attached to the underlying phone system and is for use in advanced applications. These variables cease to exist when the call stops and are not accessible by other calls.
System Variable
The Variable is stored in a database. System variables are global, visible to all other calls and continue to exist indefinitely.
ValueÂ
Controls how the contents of the 'Value' field are interpreted.
The Type and name of the Value that we want to add to the Variable. The Value may be another variable or a number (decimal or integer).
The drop list selects the Type, whilst the text field allows you to enter the name of the variable or the number to be added.
Value Type
The possible types of the Value field are listed below.
Route Variable
The contents of the Value are interpreted as the name of a Route Variable and the Route Variables value is added to the Variable.
Asterisk Variable
The contents of the Value are interpreted as the name of a Channel Variable and the Channel Variables value is added to the Variable.
System Variable
The contents of the Value are interpreted as the name of a System Variable and the System Variables value is added to the Variable.
Literal
The contents of the Value are interpreted as number (decimal or integer) with the entered value being added to the Variable.
Reset to Zero After
You can use this option to 'roll the value' over if you are incrementing a variable and you want to reset it back to zero after it reaches a defined value.
Max Value
if 'Rest to Zero After' is enabled then if the increment causes the variable to exceed this value, then the variable we be reset to zero.