Cisco Cisco Unified Customer Voice Portal 11.0(1) Developer's Guide

Page of 79
C
HAPTER 
3:
 
S
ESSION 
API
 
 
C
ISCO 
CVP V
OICE
XML 3.1
 
 
  
Programmer 
Guide 
 
Chapter 3: Session API 
As described in the previous chapter, Cisco CVP VoiceXML 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 logging level or the voice 
browser. This API is also the conduit for the developer to set element or session data, add custom 
content to the activity log, or access the user management system. 
Any custom component built by the developer will be sent this API to interface with the session. 
This section of the document describes this 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 CVP VoiceXML 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 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, though all these classes extend a 
common class, 
APIBase
 (found in the 
com.audium.server.session
 package). 
APIBase 
defines functions any component can perform, such as: 
• 
Obtaining telephony information such as the ANI and DNIS. 
• 
Obtaining application setting data such as the gateway adapter name, logging level, 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. 
• 
Getting access to the User Management system, allowing the component to create, modify, or 
query information on users. 
• 
Creating session data. This class does not allow the creation of element data because only 
elements can do so (the start of call class cannot, for example). 
• 
Adding custom content to the activity log and warnings to the error log. 
 
 
Copyright 2001 - 2005 Audium Corporation.  All Rights Reserved. 10/05
 
19