Including DTMF in a hot word grammar

You can include DTMF tones in a hot word grammar. This feature enables you to specify one or more DTMF tones that the user can enter as the hot word whenever the hot word grammar is active—for example, to return from a bridged <transfer> call. (Note that hot word recognition is not available on transfers that have a far-end dialog.)

The following section of VoiceXML code demonstrates how to use a hot word grammar while performing a bridged transfer. When the user says “home home” or enters the touch tone sequence in the grammar (1 2), the transferred call will be ended and the user will return to the VoiceXML page.

<transfer destexpr="'tel:+1' + phoneNumber" bridge="true">
    <grammar type="application/srgs+xml" root="grammar1">
        <rule id="Hotword">
            <one-of>
                <item>home home</item>
            </one-of>
        </rule>
    </grammar>
    <grammar type="application/srgs+xml" root="grammar2" mode="dtmf">
        <rule id="HotDtmf">
            <one-of>
                <item>1 2</item>
            </one-of>
        </rule>
    </grammar>
</transfer>

For a description of hot word functionality, please see Hot word grammar.