Cisco Cisco Customer Voice Portal Downloads 开发者指南
C
HAPTER
12:
O
N
E
RROR
N
OTIFICATION
C
ISCO
CVP V
OICE
XML 3.1
Programmer
Guide
Chapter 12: On Error Notification
The error notification process can only be implemented using Java because when an error occurs,
one desires the most reliable method for reporting that error. There is no guarantee an HTTP
request to a URI could even be generated, a response received and the XML parsed without
incurring another error.
one desires the most reliable method for reporting that error. There is no guarantee an HTTP
request to a URI could even be generated, a response received and the XML parsed without
incurring another error.
The on error notification class is built in Java by implementing the class
GlobalErrorInterface
found in the
com.audium.server.proxy
package. It contains a single
method named
doError
that acts as the execution method for the class. The method receives
nine arguments containing information on the status of the application and CVP VoiceXML
Server at the time the error occurred. No API classes are passed to this method because accessing
them may cause additional errors due to their complexity. Any of the arguments may be
Server at the time the error occurred. No API classes are passed to this method because accessing
them may cause additional errors due to their complexity. Any of the arguments may be
null
if
the data cannot be determined or the error is such that it is not related to a specific application.
The arguments are: the Server session ID (as a
String
), the name of the application (as a
String
), the ANI (as a
String
), the DNIS (as a
String
), the IIDIGITS (as a
String
), the UUI
(as a
String
), an
ArrayList
of
String
s listing the elements visited in the call up to the time the
error occurred, an
ArrayList
of the
String
s listing the exit states for each of the elements, and
a
HashMap
containing the session data created up to the time the error occurred (the key of the
HashMap
is the name of the session data, and the value is the session data value).
The on error notification class must be deployed in the
common
directory of the Server since
classes placed there are shared across applications.
To configure the Server to use this class if an error occurs, a file named
global_config.xml
found in the
conf
directory of the Server must be used. This XML file contains a tag named
<error_class>
that should encapsulate the full Java name of this class (package name
included). The changes will take effect only the next time the Java application server on which
the Server is installed is restarted.
the Server is installed is restarted.
Copyright 2001 - 2005 Audium Corporation. All Rights Reserved. 10/05
72