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

Page of 122
Voice Foundation Classes
The Unified CVP Voice Foundation Classes are a Java API for generating VoiceXML. Any
custom component wishing to produce VoiceXML must use the VFCs because their main
purpose is to act as an abstraction layer between VoiceXML and the component. The VFCs
handle the vagaries of VoiceXML and especially the differences in the VoiceXML interpreted
by various voice browsers. This allows the developer to simply focus on the functionality desired
without worrying about the details of writing VoiceXML or the quirks of their chosen voice
browser. The VFCs are primarily used to construct voice elements, though hotevents and on
call end classes use the VFCs as well.
VFC Design
The high level design of the VFCs is to simulate standard VoiceXML in Java. The behavior of
these classes directly matches the VoiceXML specifications (both versions 1 and 2). This,
however, acts only as a basis from which supporting a particular voice browser begins, since
no two browsers have exactly the same compliance. The software provides voice browser
compatibility by extending these base VFCs to create a layer that produces the VoiceXML
compatible with a particular voice browser. Most of the functionality is still defined in the base
VFC classes and only the browser-specific functionality needs to be included in the subclasses.
The classes for a particular voice browser are encapsulated in a separate plugin or driver, called
a Gateway Adapter. Installing a new Gateway Adapter will add support for a new voice browser
and a Unified CVP application can be deployed on a new browser by simply selecting the
Gateway Adapter to use.
The design of the base VFCs follows roughly the design of VoiceXML, utilizing similar concepts
and naming, so prior knowledge of VoiceXML is beneficial for understanding the VFC design.
The VFCs allow full compatibility with VoiceXML in that anything you can do in VoiceXML
you can do in the VFCs, including using proprietary tags and/or attributes introduced by supported
browsers.
Many times, a single VoiceXML tag maps to a single VFC that is similarly named. The class
VForm
, for example, deals with VoiceXML 
<form>
 tags and the class 
VField
 with 
<field>
Programming Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 8.0(1)
103
Appendix A