<?xml version="1.0" encoding="UTF-8"?>
<!-- @ Copyright 1998-2003 W3C (MIT, ERCIM, Keio), All Rights Reserved. See http://www.w3.org/Consortium/Legal/. @ -->
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" xmlns:conf="http://www.w3.org/2002/vxml-conformance" >

  <!-- 
  Assertion: The input item 'transfer' may contain the prompt element. Prompt elements specify prompts to play when visiting this input item.
  Pass if prompt given by conf:speech is played; otherwise fail.
  The telephone number is not important in these cases, as long as the transfer is executed so that the prompt plays

  NOTE: This probably needs to be a manual test due to timing issues. If the driver responds before the transfer has commenced,
    the interpreter may not be listening.
  -->

  <link event="event.alpha">
    <conf:grammar utterance="alpha"/>
  </link>

  <catch event="event.alpha">
    <conf:comment>driver responded before transfer connected.</conf:comment>
    <conf:pass/>
  </catch>

  <form id="form0">
    <transfer name="xfer" bridge="true" dest="tel:+18005551212" maxtime="10s">
      <conf:grammar utterance="alpha"/>
      <conf:speech value="alpha"/>
      <filled>
        <if cond="xfer == 'near_end_disconnect'">
          <conf:comment>driver responded after transfer connected</conf:comment>
          <conf:pass/>
        <else/>
          <conf:fail expr="'expected near_end_disconnect; got ' + xfer"/>
        </if>
      </filled>
    </transfer>
  </form>

  <catch><conf:fail expr="'catch-all caught ' + _event"/></catch>
</vxml>

