Cisco Cisco Customer Voice Portal Downloads Developer's Guide

Page of 79
C
HAPTER 
9:
 
C
ONFIGURABLE
 E
LEMENTS
 
 
C
ISCO 
CVP V
OICE
XML 3.1
 
 
  
Programmer 
Guide 
 
elements will require multiple pages, the content of each depending on the actions of the caller. 
When a voice element is done producing VoiceXML pages, it returns an appropriate exit state so 
the Server can visit the next element according to the call flow. As long as the proper VoiceXML 
is passed back through the execution method, the developer is free to do anything allowed by 
Java, including creating helper classes, accessing backend systems, etc.  
Having a single voice element class produce multiple VoiceXML pages poses a problem. With 
multiple calls simultaneously accessing the element in various stages of a call, how is the voice 
element to know where a particular caller is within the element at any one moment in time? CVP 
VoiceXML helps by providing “scratch space” for custom voice elements to store any data it 
wishes. The Server maintains separate scratch data for each call and makes this data available to 
the voice element through the Session API. Usually the data stored in the scratch space will be 
the state of the element for a particular call. Each time the execution method is called, the 
element can check the scratch space, determine where the caller is within the element’s internal 
call flow, and produce the appropriate VoiceXML page. Borrowing web application 
terminology, scratch space provides “session and state management” functionality to voice 
elements. Any Java class can be added to the scratch space so the developer can get as complex 
as desired in handling the state management. Note that when the voice element is complete, the 
scratch space is automatically cleared by the Server, meaning that a voice element that is 
revisited in the same call will start off with empty scratch space. 
Figure 9-1 shows a diagram that visualizes the above points concerning how a voice element 
interacts with the Server and the voice browser. 
 
Figure 9-1 
 
 
Copyright 2001 - 2005 Audium Corporation.  All Rights Reserved. 10/05
 
55