Getting Started with VoiceGenie Extensions

Specifying the VoiceGenie Namespace

 

To use VoiceGenie extensions in your applications, your VoiceXML pages will need to specify the VoiceGenie extension namespace:

 

<vxml Version="2.1" xmlns="http://www.w3.org/2001/vxml" xmlns:vg="http://www.voicegenie.com/2006/vxml21-extension">

 

The xmlns:vg is referencing the VoiceGenie namespace, and saying that any elements or tags with "vg:" in front of it are from the VoiceGenie namespace.

 

This concept is best illustrated with an example:

 

<?xml version="1.0"?>
<vxml Version="2.1" xmlns="http://www.w3.org/2001/vxml" xmlns:vg="http://www.voicegenie.com/2006/vxml21-extension">
<var name="a" expr = "1"/>
<var name="formName" expr = "'form3'"/>
  <form id="form1">
      <var name="b" expr="'block5'"/>        
      <block name = "block1">
        <log>testing goto</log>
        <prompt>Good morning Voicegenie!</prompt>
        <goto next="SomeOtherPage.vxml" vg:fetchaudiominimum="5s" fetchtimeout="100s" fetchaudio="audio/brahms2.wav"/>
      </block>       
  </form>
</vxml>

 

You'll notice that each time a VoiceGenie extension is used, it is prefixed with "vg:" as that is what is specified by xmlns:vg on line 1.