<?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 628 Section 1.2.5
 The implementation must report characters (DTMF entered by the user).

 Web requirements:
 none

 a628.vxml
   The inputmodes property is set to "dtmf", then the interpreter listens
   for up to 10 characters entered using the keypad.

 @author Dan Evans dde@nortelnetworks.com
 @version 1.0, 08/15/2002
 @version 2.0, 01/20/2003 DTMF grammar
-->
<property name="inputmodes" value="dtmf"/>
<property name="termchar" value="#"/>
<catch>
  <conf:fail expr="'unexpected event ' + _event"/>
</catch>
<form id="a628">
  <var name="errs" expr="0"/>
  <field name="test1">
    <conf:dtmf value="12345"/> 
    <grammar mode="dtmf" version="1.0" root="digits" type="application/srgs+xml">
      <rule id="digits" scope="public">
        <item repeat="1-10">
          <one-of>
            <item> 0 </item>
            <item> 1 </item>
            <item> 2 </item>
            <item> 3 </item>
            <item> 4 </item>
            <item> 5 </item>
            <item> 6 </item>
            <item> 7 </item>
            <item> 8 </item>
            <item> 9 </item>
          </one-of>
        </item>
      </rule>
    </grammar>
    <filled>
      <conf:comment>test1 = <value expr="test1"/></conf:comment>
      <if cond="test1$.inputmode != 'dtmf'">
        <conf:fail reason="a628.fail.test1: did not received dtmf input as expected"/>
      </if>
      <if cond="test1.match(/[0-9]+/) != null">
        <conf:pass/>
      <else/>
        <conf:fail expr="'expected 12345; got ' + test1"/>
      </if>
    </filled>
  </field>
</form>
</vxml>
