Cisco Cisco Customer Voice Portal Downloads Guía Del Desarrollador

Descargar
Página de 98
C
HAPTER 
3:
 
S
ESSION 
API
 
 
V
OICE
XML
 
P
ROGRAMMING 
G
UIDE 
 
 
 
FOR 
C
ISCO 
U
NIFIED 
C
USTOMER 
V
OICE 
P
ORTAL 
R
ELEASE 
4.0(1) 
 
 
 
 
11
 
Chapter 3:
 Session API 
As described in the previous chapter, Cisco Unified CVP provides a mechanism for the 
developer to access and change information having to do with the phone call or the session. 
Through this API one can get environment information such as the phone number of the caller 
(ANI), the time the call began, and application settings such as the default audio path. This API 
is also the conduit for the developer to set element or session data, send custom logging events, 
or access the user management system. A subset of the Session API, called the Global API 
provides access to data that exists beyond individual sessions. 
Any custom component built by the developer will be sent this API to interface with the session. 
This section of the document describes the API and what it can be used for. Both the Java and 
XML versions of this API are described. Subsequent chapters will detail the APIs used to 
actually construct components. 
Java API 
As described previously, every Unified CVP component is constructed by implementing a Java 
interface or extending a Java class and overriding a single execution method. One argument to 
this method is a Unified CVP VoiceXML-specified Java class that acts as the API to the session. 
Methods in this class are used to get or change information stored in the session, such as element 
or session data.  
A different API class is used depending on the component. All API classes are derived from the 
base class 
APIBase
, though all non-logger API classes directly extend
 ComponentAPI
 (both are 
found in the 
com.audium.server.session
 package).  
APIBase 
defines information retrieval 
functions any component accessed within a call session can use, such as: 
    Obtaining telephony information such as the ANI and DNIS. 
    Obtaining application setting data such as the gateway adapter name, default audio path, 
maintainer, etc. 
    Getting element or session data created by components run prior to the current component. 
    Retrieving a list of elements and the exit states encountered by the caller prior to the current 
component. 
    Obtaining information on where the current application resides in order to aid in the loading 
of custom content found there. 
ComponentAPI
 adds to this the ability to alter some environment settings: 
    Getting access to the User Management system, allowing the component to create, modify, or 
query information on users.