The reason for this behavior with your IVR code is because you are using a mix of builtin IVR (<field name="phone" type="digits?length=10">) and inline IVR (<grammar mode="dtmf" type="application/x-jsgf">(1|2|3|4|5|6|7|8|9|0)+ </grammar>) <grammar>s.
Instead, you should rearrange your IVR code to the following:
builtindigitsdtmfgrammar.php:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form id="phone">
<field name="phone">
<grammar src="builtin:dtmf/digits?length=10"/>
<prompt bargein="false">
Your phone number is needed for future verification purposes. Using the keypad
on your telephone, please enter your 10-digit telephone number, starting with the area code.
</prompt>
<filled>
<assign expr="phone" name="phoneNum"></assign>
</filled>
</field>
</form>
</vxml>
Regards,
Plum Support