Plum DEV Documentation
voicexml:tags:reprompt

<reprompt>

The form interpretation algorithm expects a catch element to queue appropriate prompts in the course of handling an event. Therefore, the form interpretation algorithm does not generally perform the normal selection and queuing of prompts on the next iteration following the execution of a catch element. However, the form interpretation algorithm does perform normal selection and queueing of prompts after the execution of a catch element (<catch>, <error>, <help>, <noinput>, <nomatch>) in two cases:

  • If the catch element ends by executing a <goto> to another dialog; in this case, the new dialog needs to be guaranteed that its initial prompt remains intact and cannot be suppressed or replaced by a referring dialog.
  • If a <reprompt> is executed in the catch to request that the subsequent prompts be played.

In these two cases, after the FIA selects the next form item to visit, it performs normal prompt processing, including selecting and queuing the form item's prompts and incrementing the form item's prompt counter.

Attributes

None

Notes

None

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="myfield">
      <grammar type="application/x-jsgf" mode="dtmf">
        ( 1 | 2 )+
      </grammar>
      <grammar type="application/x-jsgf" mode="voice">
        ( one | two )+
      </grammar>
      <prompt>
        Say or enter any number of the digits one or two.
      </prompt>
      <filled>
        You entered <value expr="myfield"/>.
      </filled>
      <nomatch>
        <prompt>
          You did not say or enter any ones or twos.
        </prompt>
        <!-- You must include the "reprompt" tag if you want -->
        <!-- the original prompt to be repeated. -->
        <reprompt/>
      </nomatch>
      <noinput>
        <prompt>
          You did not enter anything.
        </prompt>
        <!-- You must include the "reprompt" tag if you want -->
        <!-- the original prompt to be repeated. -->
        <reprompt/>
      </noinput>
    </field>
  </form>
</vxml>

The output of the above script would be:

Computer: Say or enter any number of the digits one or two.
Human: (enters DTMF-5)
Computer: You did not say or enter any ones or twos.
Computer: Say or enter any number of the digits one or two.
Human: (silently waits for prompt to timeout)
Computer: You did not enter anything.
Computer: Say or enter any number of the digits one or two.
Human: One two one two.
Computer: You entered one two one two.

Child Tags

None

Parent Tags