Answers
to Your Questions About VoiceXML
In
this monthly column, an industry expert will answer
common questions about VoiceXML and related technologies.
Readers are encouraged to submit questions about VoiceXML,
including development, voice-user interface design,
and speech technology in general, or how VoiceXML is
being used commercially in the marketplace. If you have
a question about VoiceXML, e-mail it to speak.and.listen@voicexmlreview.org
and be sure to read future issues of VoiceXML Review
for the answer.
This
month we examine more questions from our readers.
Q: After the caller has hung up, is there any way for
me to perform any "clean up" to track that
back on my Web server?
A: Yes. There are several reasons why VoiceXML
developers often want to perform some kind of "post-hangup
processing". Most often, it is to POST some final
information back to the Web server for logging/tracking
purposes. For example, a commerce application may want
to explicitly note the list of things that were left
in a caller's shopping cart when they suddenly hung
up without buying anything.
VoiceXML
specifies the pre-defined events "telephone.disconnect.hangup"
and "telephone.disconnect.transfer", which
can be caught to do this kind of post-hangup processing.
"telephone.disconnect.hangup" is thrown when
the caller explicitly hangs up the phone, and "telephone.disconnect.transfer"
is thrown when a blind (non-bridging) call transfer
is invoked and the caller has been permanently transferred
to another line and will not return.
A
simple example of using "telephone.disconnect.hangup"
to submit information back to your Web server is as
follows:
<!-- APPLICATION_ROOT.VXML -->
<vxml>
<!-- some global variables -->
<var name="last_state" expr="'null'" />
<var name="usr_id" expr="'null'" />
<!--this defines an application-scope event handler for post-hangup processing -->
<catch event="telephone.disconnect.hangup">
<submit namelist="last_state usr_id" src="onhangup.jsp" fetchtimeout="5s" />
</catch>
</vxml>
<!-- MY_APPLICATION.VXML -->
<vxml application="application_root.vxml">
...
...
<!-- your whole application that sets last_state and usr_id throughout -->
...
...
</vxml>
|
Note
that in the global event handler above, "fetchtimeout"
is limited to 5 seconds. This is intentiona -- it's
important to note that post hangup processing can
be very tricky performance-wise. It could be very
easy to write applications that accidentally (or intentionally)
take a long time to complete this processing, and
would ultimately crash or seriously degrade the performance
of your VoiceXML server once enough calls had passed
through the system. It's critical to evaluate both
your VoiceXML platform and your application's performance
and design with regard to this feature.
Q:
Does VoiceXML support cookies?
A:
Because VoiceXML is based on HTTP and the Web development
paradigm, it is natural to assume that VoiceXML should
support cookies just like "regular" Web sites.
Technically, the VoiceXML 1.0 specification does not
explicitly include or preclude support for cookies.
However, most commercial VoiceXML platform implementations
available today do support "session cookies";
cookies which expire at the end of a "browser session",
which in the case of VoiceXML is a single phone call.
Most platform implementations do not support "persistent"
cookies, because on the phone they require the notion
of a persistent user database with formalized authentication
for callers. This is because, on the phone, your browser
is "in the cloud" so to speak and the only
way for the system to get *your* persistent cookies
securely would be for you to explicitly sign in with
a user name and password or equivalent authentication
mechanism. Automatic Number Identification (ANI) or
Caller ID cannot be used for this, because they are
not guaranteed to map to a specific user of a specific
telephone handset.
Several
of the online VoiceXML development resources called
out on http://www.voicexml.org/faqs.html
have detailed information and code examples on how to
use cookies with VoiceXML applications.
back
to the top
Copyright
© 2001 VoiceXML Forum. All rights reserved.
The VoiceXML Forum is a program of the
IEEE
Industry Standards and Technology Organization (IEEE-ISTO).
|