» Sign in
  

Choose from the following:

 » Description
 » Size of package
 » Format
 » Notes

Description

Scenario

This service demonstrates how to use the <menu> element to interact with the users thanks to DTMF (Digital Tone Multi Frequency). On an incoming call, the service:
  • asks the caller to enter DTMF 1 or 2 using keypad.
  • collects the entered DTMF and depending on the DTMF value, redirects the caller to a specific form.

Code


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/2001/vxml
      http://www.w3.org/TR/voicexml20/vxml.xsd">

  <meta name="en_menudtmf.vxml" content=""/>
  <meta name="Author" content="HP"/>
  <meta name="Date" content="September, 2005"/>
  <meta name="Description"
        content="This VoiceXML example is provided
              as part of an HP OpenCall Media Platform
              VoiceXML installation"/>
  <meta name="Support" content="none"/>

  <menu id="dayselection">
    <prompt>
      Press 1 for Monday and 2 for Tuesday.
    </prompt>
    <!-- If the caller presses the DTMF 1, he will be
                redirected to the form with id equals to monday -->

    <choice dtmf="1" next="#monday"/>
    <!-- If the caller presses the DTMF 2, he will be
                redirected to the form with id equals to tuesday -->

    <choice dtmf="2" next="#tuesday"/>
    <!-- Message played if any error occured -->
    <error count="1">
      An error has occured.
    </error>
    <!-- Message played if the caller does not press a key -->
    <noinput count="1">
      You have to press 1 or 2 to choose between monday or tuesday.
    </noinput>
    <!-- Message played if the caller enters
                something that does not match -->

    <nomatch count="1">
      Please press 1 or 2 to choose Monday or Tuesday.
    </nomatch>
  </menu>
  <!-- Form interpreted when the caller has pressed 1 -->
  <form id="monday">
    <block>
      Thanks, you selected Monday.
    </block>
  </form>
  <!-- Form interpreted when the caller has pressed 2 -->
  <form id="tuesday">
    <block>
      Thanks, you selected Tuesday.
    </block>
  </form>
</vxml>

 » Back to top

Size of package

25KB
 » Back to top

Format

ZIP
 » Back to top

Notes

Warning: You must install and enable an English TTS engine before executing this service.
 » Back to top

Licensing and download

Size

Date

 » en_menudtmf.zip
zip file
(2.0 KB)
Aug 2007


Manage My AllianceOne Membership

 
 » Sign in
 » Join AllianceOne
 » Contact us