Cisco Cisco Unified Customer Voice Portal 10.5(1) 開発者ガイド
C
HAPTER
9:
C
ONFIGURABLE
E
LEMENTS
V
OICE
XML
P
ROGRAMMING
G
UIDE
FOR
C
ISCO
U
NIFIED
C
USTOMER
V
OICE
P
ORTAL
R
ELEASE
4.0(1)
47
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?
Unified CVP helps by providing “scratch space” for custom voice elements to store any data it
wishes. The VoiceXML 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 VoiceXML Server, meaning that a
voice element that is revisited in the same call will start off with empty scratch space.
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?
Unified CVP helps by providing “scratch space” for custom voice elements to store any data it
wishes. The VoiceXML 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 VoiceXML 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 VoiceXML Server and the voice browser.
interacts with the VoiceXML Server and the voice browser.
Figure 9-1