Cisco Cisco Unified Customer Voice Portal 11.0(1) Guida Dello Sviluppatore

Pagina di 98
C
HAPTER 
9:
 
C
ONFIGURABLE
 E
LEMENTS
 
 
V
OICE
XML
 
P
ROGRAMMING 
G
UIDE 
 
 
 
FOR 
C
ISCO 
U
NIFIED 
C
USTOMER 
V
OICE 
P
ORTAL 
R
ELEASE 
4.0(1) 
 
 
 
 
55
 
must be explicitly added to the argument list in order to log correctly. Another advantage of 
using the 
getSubmitVAction()
 methods are that they already add this variable to the submit. 
The convention used to for interaction logging appends the action name, description, and 
timestamp using the following format:  
|||ACTION$$$VALUE^^^ELAPSED
”  
where: 
    ACTION is the name of the action. There are currently seven different actions that can be 
logged (the names are exactly as listed, all lowercase):  
o
 
audio_group. 
This is used to indicate that the caller heard an audio group play. The value 
is the name of the audio group. 
o
 
inputmode.
 This is used to report how the caller entered their data, whether by voice or 
by DTMF keypresses. The value is stored in the inputmode VoiceXML shadow variable. 
o
 
utterance.
 This is used to report the utterance as recorded by the speech recognition 
engine (available using a VoiceXML shadow variable). The value is the actual utterance. 
o
 
interpretation.
 This is used to report the interpretation as recorded by the speech 
recognition engine. The value is the actual interpretation. 
o
 
confidence.
 This is used to report the confidence as recorded by the speech recognition 
engine (available using a VoiceXML shadow variable). The value is the confidence 
value. 
o
 
nomatch.
 This is used to indicate the caller entered the wrong information, incurring a 
nomatch event. The value is the count of the nomatch event. 
o
 
noinput.
 This is used to indicate the caller entered nothing, incurring a noinput event. The 
value is the count of the noinput event. 
    VALUE is the value (description) to put in the log. 
    ELAPSED is the number of milliseconds since the VoiceXML page was entered. This is 
required in order to keep an accurate timestamp in the activity log. Luckily, the VoiceXML 
Server-generated root document provides a Javascript function named 
application.getElapsedTime(START_TIME)
 that returns the number of milliseconds 
elapsed since the time specified in 
START_TIME
. A VoiceXML variable is declared in the root 
document that holds the time the VoiceXML page was entered and should be passed as input 
to this method. The variable name is 
audium_element_start_time_millisecs
, though just 
as with 
audium_vxmlLog
, a Java constant defined in 
VoiceElementBase
 named 
ELEMENT_START_TIME_MILLISECS
 should be used to refer to this variable
.
 
Interaction logging is best explained though several examples. The first example wishes to add to 
the interaction log the fact that the xyz audio group was played. The VoiceXML necessary to 
produce this logging as per the specified convention would be: