Cisco Cisco Customer Voice Portal 8.0(1) Developer's Guide

Page of 122
The call end action can be implemented with either the Java API or the XML API. Unlike the
call start action using the XML API, the call end action does not have an option to perform it
in the background. In fact, one need not worry about performing time consuming tasks in the
call end action because it will not affect the performance of the call since it has ended. One
must still be careful not to perform tasks that maximize CPU usage since that would aversely
affect the handling of other calls.
Like the call start action, the call end action can modify the session such as creating session
data or changing the default audio path, though these actions would not make sense as there is
no more call flow to visit. The call end action can access everything that occurred within the
call, including how the call ended (hangup, call transfer, etc.) This is useful for activities such
as creating CDR records which must list everything a caller did.
A unique feature of the call end action is to optionally send back a final VoiceXML page to the
voice browser. Some voice browsers will actually interpret a VoiceXML page sent back in
response to a request triggered by a disconnect or hang-up event. Since the caller is no longer
interacting with the IVR, this page would obviously only be useful for limited functionality that
had nothing to do with interacting with the caller, such as executing 
<log>
 tags.
Note: This final page applies only to when the caller hangs up on the application or the
application hangs up on the caller.
This chapter contains the following topics:
Using the Java API
The end of call action is built in Java by implementing the Unified CVP class
EndCallInterface
 found in the 
com.audium.server.proxy
 package. It contains a single
method named 
onEndCall
 that is the execution method for the call end class. This method
receives a single argument, an instance of 
CallEndAPI
. This class belongs to the Session API
and is used to access session information such as session data (See 
more information on this API). The method does not have a return value. It is expected that
should an unrecoverable error occur, the call end action will throw an 
AudiumException
.
If the call end action is to return a final VoiceXML page to the voice browser, this is done by
using the Voice Foundation Classes (VFCs) (See 
more on the VFCs) and accessing methods in the 
CallEndAPI
 Session API class.
Using the XML API
, the standard inputs and settings XML documents are
sent via POST to the call start URI. The following shows the DTD diagram of the XML document
that must be sent in response. The DTD for the end of call action response is defined in the file
CallEndResponse.dtd
 found in the VXML Server 
dtds
 folder.
Programming Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 8.0(1)
32
Chapter 5: Call End Action
Using the Java API