Home > Articles > Web Services > XML

  • Print
  • + Share This
Like this article? We recommend

Login Form Version 1

Let’s now examine what happens when a user enters a correct phone number, but messes up on the pin.

Listing 1 A simple login form for the Baseball Hotline

  <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">

    <form id="login">
        Welcome the Baseball fact hotline.

      <field name="phone_number" type="phone">
        <prompt>Please say or key in your phone number </prompt>


      <field name="pin" type="digits">
        <prompt count=1>Please say or enter your 4 digit PIN code</prompt>
        <prompt count=2>What’s your PIN? </prompt>

            Ok Thanks.
        <submit next="http://www.myserver.com/servlet/login"
            Method="GET" namelist="phone_number pin"/>


When this form is executed, a possible dialogue flow might be the following:

Phone: Welcome the Baseball fact hotline.
Phone: Please say or key in your phone User: 212-321-1945
Phone: Please say or enter your 4 digit PIN code
User: 2 3 4 
Phone: Sorry I did not understand what you said. Please try again.
Phone: What’s your PIN?
User: 2 3 4 5
Phone: OK. Thanks.

Note that when processing the field for pin, a grammar violation occurred so the server played a default message and then returned to the field to continue in its effort to get a grammatically correct response. Since our pin field provided multiple prompts, we could fine-tune what the user heard the second time around.

  • + Share This
  • 🔖 Save To Your Account