termchar

Default Value: "#"

The "termchar" global property allows the user to enter an optional terminating character after entering a DTMF input and before the termtimeout has elapsed.


Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <property name="termtimeout" value="7s"/>
    <property name="termchar" value="*"/>
    <field name="myfield">
      <grammar type="application/x-jsgf" mode="dtmf">
        ( 1 | 2 )+
      </grammar>
      <prompt>
        Enter any number of the digits one or two. You may press the star key to indicate when you've finished.
      </prompt>
      <filled>
        You entered <value expr="myfield"/>.
      </filled>
      <nomatch>
        You entered a number that does not match one or two.
        <reprompt/>
      </nomatch>
      <noinput>
        You did not enter anything.
        <reprompt/>
      </noinput>
    </field>
  </form>
</vxml>

Explanation

From this example, the user has 7 seconds to enter a string of ones of twos. If the user has not entered anything after 7 seconds, a noinput event is genereated. After the first DTMF input is entered, the user has up to 7 seconds to enter more digits. Once the user has finished entering his digits, he has up to 7 seconds to enter the optional terminating star key character to indicate he is finished and the recognized value of ones or twos is returned. If the user has finished entering his digits and has not entered the the optional terminating star key character, the platform will wait for the 7 second termtimeout before acting upon the digits that were entered.


Notes

None