Page 1 of 1

How to have auto hangup after repeating <noinput> 3 times?

Posted: Tue Dec 28, 2010 2:07 am
by sasa
Hi,

I am trying to make the call hang up by itself if there is no response from caller after repeating <noinput> 3 times.

Have anyone able to do this yet? I've tried the timeout options but didnt seem to work, i'm sending the following xml upon answering a call.

$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$xml .= "<vxml version = \"2.0\" >";
$xml .= "<property name=\"inputmodes\" value=\"dtmf\"/><property name=\"interdigittimeout\" value=\"5s\"/>";
$xml .= "<form id=\"getInput\"><field name=\"$name\" type=\"$type\"><prompt>$message</prompt></field><noinput>$noinput<reprompt/></noinput>";
$xml .= "<block><submit namelist=\"session.telephone.ani $name session.telephone.dnis session.id\" next=\"vxml_plum.pl\"/></block></form></vxml>";

Advise much appreciated!
rgds
sasa

Re: How to have auto hangup after repeating <noinput> 3 time

Posted: Tue Dec 28, 2010 9:20 am
by support
Hi sasa,

To have a call disconnect after 3 <noinput> events, you'll want to use the <noinput> tags with the "count" attribute, as well as the <disconnect> tag. A simple example of this is illustrated in the following code:

disconnect.php

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
  <form>
      <field name="id" type="digits?length=7">
      <prompt>
        Enter your customer identification number.
      </prompt>
      <filled>
        <assign name="customerid" expr="id"/>
        You entered <value expr="id"/>.
        <!-- transfer to premium support -->
      </filled>
      <noinput>
        Sorry, I didn't hear you.
        <reprompt/>
      </noinput>
      <noinput count="3">
        Sorry, I can't hear you, please try you call again later. Goodbye.
        <disconnect/>
      </noinput>
      <nomatch>
        Sorry, I didn't understand.
        <reprompt/>
      </nomatch>
    </field>
  </form>
</vxml>
Notice the <noinput> tags with the count="3" attribute...

Code: Select all

<noinput count="3">
  Sorry, I can't hear you, please try you call again later. Goodbye.
  <disconnect/>
</noinput>
Here, after the first 2 noinput events, the application will say, "Sorry, I didn't hear you," and then reprompt the user. After the third noinput event, the application will say, "Sorry, I can't hear you, please try your call again later. Goodbye." The application will then hang up on the user.

Regards,
Plum Support

Re: How to have auto hangup after repeating <noinput> 3 time

Posted: Tue Dec 28, 2010 10:00 pm
by sasa
oh great! thanks! exactly what i'm looking for!