Example

This example shows the timeout properties being used to determine how long the system should wait after the user has made a response. If the user gives the response “San Francisco” or “New York City”, the completetimeout value is used and the system waits 500 ms before continuing. If, however, the user responds with “New York”, it is unclear whether the user will add the word “City”. In this case, the incompletetimeout value of 2 seconds is used to allow the user extra time to complete the utterance if necessary.

<?xml version="1.0" encoding="iso-8859-1"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" xml:lang="en-US">
 <property name="incompletetimeout" value="2s"/>
 <property name="completetimeout" value="500ms"/>
 <form>
  <field name="city">
   <prompt> What city please? </prompt>
   <grammar version="1.0" root="where">
    <rule id="where">
     <one-of>
      <item> San Francisco </item>
      <item> New York </item>
      <item> New York City </item>
     </one-of>
    </rule>
   </grammar>
   <filled>
    <prompt>
     <value expr="city"/>, here we come!
    </prompt>
   </filled>
  </field>
 </form>
</vxml>