<?xml version="1.0"?>
<vxml version="2.0">
  <property name="sensitivity" value="0.8"/>
  <property name="confidencelevel" value="0.2"/>
  <var name="mycity" expr="''"/>
  <var name="mystate" expr="''"/>
  <form id="name">
    <property name="inputmodes" value="voice"/>
    <field name="lastname" type="lastname">
      <prompt>Say your last name and spell it.</prompt>
    </field>
    <field name="firstname" type="firstname">
      <prompt>Say your first name and spell it.</prompt>
      <filled>
        <prompt bargein="false">
          Your first name is <value expr="firstname"/> and your last name is <value expr="lastname"/>
        </prompt>
        <goto next="#citystate"/>
      </filled>
    </field>
  </form>
  <form id="citystate">
    <property name="inputmodes" value="voice"/>
    <grammar src="http://vxml.plumgroup.com/grammars/uscitystate.php" root="uscitystate" type="application/srgs+xml" mode="voice"/>
    <initial>
      <prompt>Say the city and state.</prompt>
    </initial>
    <field name="city"/>
    <field name="state"/>
    <field name="county"/>
    <filled>
      <prompt bargein="false">
        The city is <value expr="city"/> and the state is <value expr="state"/> in <value expr="county"/> county.
      </prompt>
      <assign name="mycity" expr="city"/>
      <assign name="mystate" expr="state"/>
      <goto next="#street"/>
    </filled>
  </form>
  <form id="street">
    <property name="inputmodes" value="voice"/>
    <field name="street">
      <grammar srcexpr="'http://vxml.plumgroup.com/grammars/usstreetaddress.php?city='+escape(mycity)+'&amp;state='+escape(mystate)" root="usstreet" type="application/srgs+xml" mode="voice"/>
      <prompt>Please say your full street address: the number first followed by the street name and type.</prompt>
    </field>
    <filled>
      You said <value expr="street$.utterance"/>
    </filled>
  </form>
</vxml>
