VoiceXML 2.1 Development GuideHome  |  Frameset Home

  Transfer Shadow Variables  |  TOC  |  H: Property Guide  

Transfer Hotwording


Transfer hotwording is a technique for disconnecting a call created via the <transfer> element by
specifying a locally scoped grammar. Hotwording gives a way to disconnect a created call
without leaving our VoiceXML application, and we can use a well constructed hotword grammar to accomplish this.

The linchpin in using hotwording within a transfer context is that the grammar MUST be locally scoped.
When a transfer is initiated the VoiceXML application will park itself and patiently wait
for an event to occur while you're presumably having a conversation. Our friendly VoiceXML interpreter must
disable any active grammars during your conversation so as not to pick up an accidental grammar match. But
if we specify a grammar within the transfer block itself then the interpreter will know to keep that grammar active.

Since the interpreter will attentively listen to each word the caller speaks in an attempt to make a grammar match,
you are strongly advised to keep your grammar very small with compact utterances. Also keep in mind that only utterences
from the caller's side of the call leg is monitored for grammar matches.

Let's look at an example. Below is a basic transfer block. We've specified a simple grammar local to the transfer block
that will catch the words "disconnect", "hangup" and "goodbye".


<var name="xferPhoneNum" expr="'tel:+12225554444'"/>

<form id="Main">
    <block>
        <prompt>Beginning transfer operation.</prompt>
    </block>
    <transfer  name="xfer"
                    destexpr="xferPhoneNum"
                    maxtime="120s"
                    bridge="true"
                    connecttimout="20s">

        <grammar type="text/gsl">
                    [ disconnect hangup goodbye ]
        </grammar>
    </transfer>
</form>


Now for purposes of example let's add a global grammar. If you remember from the tutorial on
Call Flow we can make a global hotword grammar
using the link tag. That grammar usually is active for the whole span of the application, but try it out
and you'll see that once the transfer fires you can say the words "main", "stop" or "hold" and not get a match.
Saying the words "disconnect", "hangup" or "goodbye" will match, causing the transfer initiated call to disconnect.


<var name="xferPhoneNum" expr="'tel:+12225554444'"/>

<link next="#Main">
    <grammar type="text/gsl">
        [ main stop hold ]
    </grammar>
</link>

<form id="Main">
    <block>
        <prompt>Beginning transfer operation.</prompt>
    </block>
    <transfer name="xfer"
                    destexpr="xferPhoneNum"
                    maxtime="120s"
                    bridge="true"
                    connecttimout="20s">

        <grammar type="text/gsl">
                [ disconnect hangup goodbye ]
        </grammar
    </transfer>
</form>



Download the Code!

  Download the source code



  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  Transfer Shadow Variables  |  TOC  |  H: Property Guide  

© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site