Description
(extension) Specifies a grammar for dtmf recognition. This tag was replaced in VoiceXML 2.0 by <grammar mode="dtmf">. However, VoiceGenie continues to allow this as a VoiceXML 2.0 extension, for convenience and backward compatibility.
Note: The IP Media Server interpreter converts <dtmf> to <grammar mode="dtmf"...>. However, the conversion does not work for in-line grammars that are enclosed in a CDATA block.
Syntax
<dtmf
src="URI"
expr="ECMAScript_Expression"
scope="dialog" | "document"
type="MIME_Type"
root="string"
version="version"
fetchhint="prefetch" | "safe"
fetchtimeout="time_interval"
maxage="integer"
maxstale="integer"
xmlns= "http://www.w3.org/2001/06/grammar">
inline dtmf grammar
</dtmf> |
Attributes
|
Attribute |
Description |
|
src |
The URI specifying the location of the dtmf grammar file. The URI can be one of the following formats:
Optional. Exactly one of src, expr, or an inline grammar must be specified. |
|
expr |
An ECMAScript expression to be evaluated and used as the
URI of the dtmf grammar file, as documented under
|
|
scope |
The scope of the dtmf grammar. This attribute can be
defined only if the
|
|
type |
The MIME type of the dtmf grammar format. Note that the VoiceGenie interpreter only supports XML and ABNF formats for DTMF grammars. |
|
root |
The root rule of the dtmf grammar. Optional. |
|
version |
The version of the dtmf grammar. Optional. (Defaults to 1.0.) |
|
fetchhint |
Defines when the dtmf grammar file should be fetched. Optional.
|
|
fetchtimeout |
The length of time to wait for the dtmf grammar file to be fetched before throwing an error.badfetch event. Optional. |
|
maxage |
Indicates that this document is willing to use a cached copy of the dtmf grammar file only while the age of the cached copy is less than or equal to the number of seconds specified by this attribute. Optional. |
|
maxstale |
Indicates that this document is willing to use a cached copy of the dtmf grammar file that has exceeded its expiration time by as much as the number of seconds specified by this attribute. Optional. |
|
xmlns |
The XML DTMF format supported by VoiceGenie requires the use of this attribute (set to http://www.w3.org/2001/06/grammar) to designate the namespace for the dtmf grammar. Required (for XML only). |
Attribute Notes
<link> grammar,
but the VoiceXML page has no input fields, no warning will be logged and no
error will be thrown. Parents
<choice>, <field>, <form>, <link>, <record>, <transfer>
Children
#PCDATA
Limitations/Restrictions
Example
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<field name="field1">
<dtmf> 9 </dtmf>
<prompt> Please enter 9. </prompt>
<filled>
You entered <value expr="field1"/>.
</filled>
</field>
</form>
</vxml> |