Result Variables
Result Variables allow modules to use the results of any other
previous modules in the script. The following types of Result
Variables can be used in the VoiceGuide script to access
information available to the script:
$RV[module title]
Allows access to the information which was saved by a particular
module.
| Module Type
|
Result Variable will contain
|
|
|
|
|
Play
|
The key pressed by the caller
|
|
Get Number Sequence
|
The number entered by the caller
|
|
Database Query
|
Data retrieved from the database or
spreadsheet. This module can return more then one Result Variable.
Please see the Database Query module
for more information on accessing this data.
|
|
Evaluate Expression
|
The Result Variable based expression is
evaluated and replaced with the data which the expression refers
to.
|
|
Record
|
The last recorded filename.
|
|
Run Program
|
Data returned by the program
which was called. Run Program module can return more then one
Result Variable - please see the Run
Program module for more information on accessing this
data.
|
|
Run VB Script
|
Data returned by the VB
Script.
|
|
Send Email
|
The address to which the Email
has been sent. Other Result Variables can be used to access the
Title, Message Body and Attachment Filename - please see the
Send Email module for more
information on accessing this data.
|
|
Voicemail box
|
The last recorded filename in this voicemail box. The
module title to access this Result Variable would be:
"Voicemail Box XXXX" where XXXX is the Voicemail box's
ID.<.
|
The Module-based Result Variables are created for the duration
of the call, and all modules running on that line during the call
will be able to access them. Even if the script jumps to another
script then the next script will still be able to access the Result
Variables created by the previous script.
$RV_CIDNAME
Caller's Name (if available). Can be used in Evaluate Expression modules to switch to
different areas on the script based on who is the caller.
On many telephone systems the Caller ID information is sent
between the first and the second Ring. Hence it is usually
necessary to set the line to answer after the second Ring if this
Result Variable is to carry any information. Select "Line Device
Config" from the View menu when running VoiceGuide to set the Ring
count.
$RV_CIDNUMBER
Caller's Telephone Number (if available). Can be used in
Evaluate Expression modules to switch
to different areas on the script based on who is the caller.
On many telephone systems the Caller ID information is sent
between the first and the second Ring. Hence it is usually
necessary to set the line to answer after the second Ring if this
Result Variable is to carry any information. Select "Line Device
Config" from the View menu when running VoiceGuide to set the Ring
count.
$RV_DNIS
Telephone number called by the caller. This information is
usually only provided on ISDN lines, and is usually used when
multiple numbers are terminated the the T1/E1 ISDN line. Using
$RV_DNIS the system can then determine which script it should be
starting for the call.
$RV_LINEID
Identification number of the line device which is handling this
call. Can be used in Run Program module to help the called program
generate the appropriate Results filename, or in the COM interface
to return results to the correct line. The ID number refers to an
internal line ID number - not the position in which that
line's status is displayed in VoiceGuide's status window.
$RV_PORTNUMBER
Line Device's position is VoiceGuide's line status listing.
Numbering starts from the top, with first line/port having a
$RV_PORTNUMBER of 1, the seconds line/port having a $RV_PORTNUMBER
of 2, etc.
$RV_STARTTIME
The Date and Time the call was started. The 'Medium' Date format
and the 'Long' Time format is used. These formats can be set in the
Windows' Control Panel - Regional Settings applet.
$RV_CALLLENGTH
Number of seconds since the call started. This variable can be
used to limit the length of time callers spend using the
system.
$RV_LINESINUSE
Number of lines on system currently busy taking calls. Not
available in VoiceGuide v5.
$RV_RINGCOUNT
Number of rings an incoming call has rung so far. This variable
can be used to determine at which point to answer the call if the
script was started with the "Start the script before
answering the call" option.
$RV_DIALEDNUMBER
If the call is an outbound call this variable stores the
telephone number which was dialed.
$RV_LastKeyPress
Last Key that was pressed, or “timeout” if a timeout event
fired.
$RV_PreviousModule
Title of the previous module, ie: from which module the script
arrived at the current module.
$RV_EventListXml
Significant events which occurred during the call along with the
times when those events occurred. This information is usually used
in in system usability analysis. (Supported in v7 only).
$RV[RUNAFTERHANGUP]
The filename of the script ran when the caller hangs up. This
filename can be set in the Evaluate Expression module. Setting of
$RV[RUNAFTERHANGUP] is only valid during the current script. This
"OnHangup Script" setting is wiped whenever a goto/gosub is made to
another script, and the new script's "OnHanup Script" setting is
used.
$RV[module title_RowCount]
$RV[module
title_ColumnIndex_RowIndex]
Please see the Database Query
module for more information on the two Result Variables
above.
$RV_PathScript
The path to the location where the script is located. Does not
include the "\" at the end.
$RV_PathVoiceGuide
The path to the location where the VoiceGuide application is
located. Does not include the "\" at the end.
$RV[VoicemailMessage]
$RV[VoicemailMessageXXXX]
The last recorded voicemail message during this call.
$RV[VoicemailMessage] returns the
filename of the last recorded voicemail message regardless of in
which voicemail box it was recorded.
$RV[VoicemailMessageXXXX]
returns the filename of the last recorded voicemail message in a
particular voicemail box - which is specified by replacing
XXXX with the number of the voicemail box.
The message must be recorded during the current call for them to be
accessible using these Result Variables.
$RV[VmbId]
ID of the last voicemail box that was accessed (either logged
into or message left for).
Outbound dialing related Result Variables
$RV[OutDial_RetriesLeft]
Number of retries left for an outgoing call. If this is the last
call attempt then this RV will have a value of 0.
$RV[OutDial_Result]
When the outgoing call has been answered or the number of
retries has been used up this RV stores the type of outcome.
Possible values are: Contacted_Human, Contacted_AM Contacted_Pager,
Contacted_Fax, Uncontactable_OnDontDialList, SIT_Reorder,
SIT_NoCircuit, SIT_CustIrReg, SIT_Unknown, SIT_Unavailable,
Uncontactable_NoAnswer
$RV[AmWelcMsg_RecLen100ms]
Length of Answering Machine message. in 100ms units. eg: a value
of 40 would indicate answering machine message was 4 seconds
long.
Conference & Call Transfers related Result Variables
$RV[Conf_DevName_X]
The device name of party X in a conference call.
eg: $RV[Conf_DevName_2]
would be the device name of device carrying the 2nd leg of a call
in the "Dial and Conference" call.
$RV[Conf_LineID_X]
The Line number of party X in a conference call.
eg: $RV[Conf_LineId_2]
would be the Line ID number of device carrying the 2nd leg of a
call in the "Dial and Conference" call.
Script Branching
(Goto/Gosub/Return) related Result
Variables
These RVs are set when a Goto or Gosub branch is
made to another script. The names are fairly self
explanatory:
$RV[ScriptEnd_Time]
$RV[ScriptEnd_Goto_Script]
$RV[ScriptEnd_Goto_Module]
$RV[ScriptStart_Time]
$RV[ScriptStart_CalledFrom_Script]
$RV[ScriptStart_CalledFrom_Module]
Current Date/Time
Result Variables
$RV_WEEKDAY
Takes on a value between 1 and 7, depending on what day it is. 1
is a Monday and 7 is a Sunday. Can be used in Evaluate Expression
modules to allow you to switch to different areas on the script
depending on the day of the week.
$RV_DD
Takes on a 2 digit value between "01" and "31", depending on
what day of the month it is. Can be used in Evaluate Expression
modules to allow you to switch to different areas on the script
depending on what day of the month it is.
$RV_MM
Takes on a 2 digit value between "01" and "12", depending on
what month it is. Can be used in Evaluate Expression modules to
allow you to switch to different areas on the script depending on
the current month.
$RV_YY
Takes on a 2 digit value of current year (eg: "03"). Can be used
in Evaluate Expression modules to allow you to switch to different
areas on the script depending on the current year.
$RV_HH
Takes on a 2 digit value between "00" and "23", indicating the
hour of the current time. Can be used in Evaluate Expression
modules to allow you to switch to different areas on the script
depending on the time of day.
$RV_NN
Takes on a 2 digit value between "00" and "59", indicating the
minute of the current time. Can be used in Evaluate Expression
modules to allow you to switch to different areas on the script
depending on the time of day.
$RV_SS
Takes on a value between "00" and "59", indicating the second of
the current time. Can be used in Evaluate Expression modules to
allow you to switch to different areas on the script depending on
the time of day.
$RV_MS
Takes on a value between "000" and "999", depending on the
millisecond fraction of the current time.
eg. use this expression to create a date and time 'timestamp' :
$RV_YY$RV_MM$RV_DD$RV_HH$RV_NN$RV_SS.$RV_MS
Where can Result Variables be
used
You can use them anywhere. eg:
-
Specifying the 'trigger' and the destination modules in Paths
leaving a module,
-
Filenames of sound files which are to be played or recorded,
-
What digits/dates/amounts are to be spoken to the caller in the
Say Number module,
-
Looking up information in a database,
-
As parameters when calling other programs,
-
Evaluate Expression modules,
-
Send Email module: in destination Email address, Title, Message
Body and Attachment Filename.
Notes
If a Result Variable is used in the script that has not yet been
defined, it will be replaced with nothing (an empty string), not a
digit zero.
Eg: If you use expression: C:\SoundFiles\Info$RV[InfoNumber].wav and the script has
not yet defined $RV[InfoNumber] then the resulting string after the
Result Variables are replaced will be: C:\SoundFiles\Info.wav
Tip
It is usually best to use quotes around the RVs which may be
empty - especially when using these RVs in a VBScript where
replacement with an empty string could potentially lead to syntax
errors unless quotes have been used.
|