Volume 1, Issue 9 - October 2001
   
   
 

Telephony Support in VoiceXML

By Rob Marchand

(Continued from Part 1)

Some platforms will provide other status codes, like 'noanswer', 'voicemail', 'answering_machine', and so on. Check your platform documentation to be sure.

The <transfer> form item variable includes a single shadow variable indicating the duration of the call in seconds. This is available as variable$.duration.

Here is a more complete example:

<?xml version="1.0"?>
<vxml version="1.0">

<form>

    <block>
   I will now attempt to transfer you to the operator. One moment please.    </block>    <transfer name="transfer_result" dest="phone://19995551212">        <dtmf>
           <!-- Allow the caller to get out with **9;
           check your platform's grammar format; this is ABNF -->                \ * \ * 9        </dtmf>              <filled>        Your call lasted <value expr="transfer_result$.duration" /> seconds.            <if cond="transfer_result == 'busy' ">                <block>                The operator is busy. Please try again later.                </block>            <elseif cond="transfer_result == 'noanswer' " />                <block>                The operator did not answer.                Please try again later.                </block>            <elseif cond="transfer_result == 'network_busy' " />                <block>                A failure occured while transfering to the operator.                Please try again later.                </block>            </if>        </filled> </form> </vxml>       

 

  • We've added a DTMF grammar to allow the caller to disconnect and return to the VoiceXML application;
  • We tell the use how long the call was;
  • We try to give some meaningful error message.

One other telephony feature provided by VoiceXML is the <disconnect/> tag. Not terribly exciting, but it gets the job done. You can use this to hang up the call from the application. The example for this one is left as an exercise for the reader!

Future Telephony Support

The telephony features within VoiceXML are somewhat limited at this point. This will change as the language evolves under the stewardship of the W3C. In particular, there is a very active committee working on Call Control features, which will allow the development of more advanced features for enhanced telephony, call control, and enterprise integration. More on that when the time is right.

What's Next?

Next time around, we're going to look at the <record> tag, and all the fun and profit that can be had with it.

If there are particular things you'd like to see covered in a future First Words column, drop me a line at firstwords@voicexmlreview.org, and I'll try to cover it.

Watch future issues of VoiceXML Review for more articles about getting started with VoiceXML. Here at the VoiceXML Review, our thoughts are with the families and victims of September 11th.

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).