How to wait in style!
Oh that back-end systems all worked at the speed of light! One of the bigger issues that you may run into when writing a VoiceXML application is waiting for a response from a back-end server. In the GUI world people are used to waiting for a short while for a response. As long as they see the progress bar at the bottom of the screen getting bigger, they know that something is happening. If they get impatient then they just hit ctrl+F5 to load the page again. As you may have realised, a telephone doesn't have a GUI to show a status bar and nor does it have a reload button.
To make matters worse, most system admins are not about to prioritise VoiceXML-based requests above normal web requests. So although in theory it would be nice to push all the VoiceXML requests to the top of the queue, so that they get handled first, it's unlikely to happen.
So what do you do when you're waiting? That depends on how long you're expecting to wait. If a particular business process can take 15 seconds or more, then you will want to inform the caller straight away. You can then play them some music and the another prompt asking them to be patient. If you want to be really cool, then randomise the prompts. But whatever you do, don't just play the prompt senselessly one after the other - a little music breaks up the monotony.
If you're only expecting a short delay - but still longer than might be comfortable for the caller, you may want to use the fetchaudio option in your submit request. which would look like this:
<submit next="next_page.jsp" fetchaudio="hang_on_in_there.wav"
fetchaudiominimum="8s" fetchaudiodelay="0s"
fetchtimeout="15s"/>
|
Here's what all that means:
- fetchaudio - specifices the audio file to be played.
- fetchaudiominimum - specifices the minimum amount of the file to be played. Let's say your prompt has some speech in it, then it makes sense to let the prompt be finished before you move on with the application - even if the response is already back from the server. Interrupting the prompt as soon as there is a response doesn't sound good.
- fetchaudiodelay - specifices how long the application should wait before playing the fetchaudio file. So let's say it usually takes 1 second to get a response, then you may want to wait 3 seconds before you start with the wait audio - though once you start, you may want to let the prompt finish (provided it isn't too long), rather than interrupt it.
- fetchtimeout - is how long the application will wait for a response. Preferably your prompt should be as long as this timeout.
Of course in VoiceXML 2.1 you might be able to use the <data> tag.
If you have any comments, ideas, issues, etc. about this topic why not try the voice-push forums
|