Page 1 of 1

Changing terminator Character '#'

Posted: Tue Apr 26, 2011 8:55 am
by rquant
I'm trying to change the value of the terminatorChar from '#' to '*' but the platform refuses it.
I need the use of # as I am expecting it from different prompts.

M EDT GrammarManager::GetRecProperties - Unable to set vxi.rec.terminatorChar from value "'*'". Defaulting to '#'.

Re: Changing terminator Character '#'

Posted: Tue Apr 26, 2011 9:05 am
by support
Hi,

To change the terminating character, you can use the "termchar" property within your code. For example:

termchar.php

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<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>
From this example, when you are prompted to enter some digits, you can enter "*" on your keypad to terminate your entry.

Hope this helps.

Regards,
Plum Support