<dtmf>

VoiceXML 1.0 only. Specifies a touch-tone key grammar.

Syntax

 <dtmf
     scope="document"|"dialog"
     src="URI"
     expr="js_expression"
     type="MIME_type"
     caching="safe"|"fast"
     fetchhint="prefetch"|"safe"
     fetchtimeout="time_interval"
     universal="string" 
 >
   Optional Inline DTMF Grammar
 </dtmf>

Description

Defines a grammar for telephone key press sequences.

Note: In VoiceXML 2.0, this tag is replaced by the <grammar> tag with the mode attribute set to dtmf.

Attribute Description
scope

Sets the scope of the DTMF grammar.

 •  document--the grammar will be active throughout the current document. If the document is the application root document, then it will be active throughout the application (application scope).
 •  dialog--the grammar is active throughout the current form.

Note: A <dtmf> element can include a scope attribute only if its parent is a <form> element. Optional (default is dialog).

The scope of any other <dtmf> element is determined by its parent:

 •  If the parent is an input item, the grammar has field scope.
 •  If the parent is a link, the scope is the element that contains the link.
 •  If the parent is a menu choice, the grammar scope is specified by the scope property of the containing <menu> element (or dialog scope by default).
src

URI of the DTMF grammar specification, when it is contained in an external file. Optional (as an alternative to an inline DTMF grammar).

expr

Extension. JavaScript expression that evaluates to grammar file URI. Optional (as alternative to src).

type

MIME type of the DTMF grammar. Optional.

For external grammars, the default type is taken from the Content-type header of the returned file. If not present, the type is inferred from the URL's extension or from the contents of the grammar (for example, a file beginning with <?xml maps to application/srgs+xml). The recognized extensions are:

 •  .grxml, .xml--XML Speech Grammar
 •  .gram--ABNF Speech Grammar
 •  .gsl, .grammar--Nuance GSL
 •  .ngo--Nuance Grammar Object
 •  .jsgf--Java Speech Grammar Format

For internal grammars, if the grammar definition specifies the grammar type (either directly with a declaration or indirectly by containing XML elements), the interpreter uses that type. If the grammar definition doesn't indicate the type, the interpreter uses the value of the type attribute, if present. Otherwise, the interpreter assumes that the grammar is in GSL format. The currently supported types are:

 •  application/srgs+xml--XML Speech Grammar
 •  application/grammar+xml--XML Speech Grammar (Deprecated; support for this value will be removed from a future release)
 •  application/srgs--ABNF Speech Grammar
 •  application/grammar--ABNF Speech Grammar (Deprecated; support for this value will be removed from a future release)
 •  application/x-nuance-gsl--Nuance GSL
 •  application/x-gsl--Nuance GSL. (Deprecated; support for this value will be removed from a future release.)
 •  application/x-nuance-dynagram-binary--Nuance Grammar Object

If you specify an unsupported type, an error is thrown. This value is used only if the web server returns an unsupported grammar type.

caching

Specifies the caching policy for the resource being fetched. See Caching. Optional.

fetchhint

Specifies whether the interpreter can attempt to optimize dialog interpretation by prefetching the resource. See Prefetching Resources. Optional.

fetchtimeout

Specifies the interval to wait for the resource to be returned before throwing a error.badfetch event. See Handling Fetching Delays. Optional.

universal

Extension. Makes this grammar a "universal" grammar with the specified name so that it can be activated and deactivated using the universals property. This attribute does not affect the scope of the grammar; it simply assigns it to a universal category.

Tip:

 •  If a JavaScript expression contains any of the characters "<", ">", or "&", that character must be replaced with the corresponding escape sequence "&lt;", "&gt;", or "&amp;". For more information, see JavaScript Quick Reference.

Usage

Parents Children
<bevocal:listen>
<field>
<form>
<link>
<transfer>

None.

See Also

 •  VoiceXML 1.0 Specification: <dtmf>
 •  Related tag: <grammar>

[Show Frames]   [FIRST] [PREVIOUS] [NEXT]
BeVocal, Inc. Café Home | Developer Agreement | Privacy Policy | Site Map | Terms & Conditions
Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL