Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Workaround to clear input buffer before user input

Discussion in 'CRM / Helpdesk / App Integration' started by millsey, Feb 14, 2013.

Thread Status:
Not open for further replies.
  1. millsey

    millsey New Member

    Dec 21, 2011
    Likes Received:

    I am using a user input component with min and max digits set to 1 and all the timers set to 1 second as a way to empty the buffer before real input starts.

    So I have a prompt playback "After the tone, please dial in your reference number replacing any letters with a star, then press hash". I then have the above user input, then the actual user input process whose initial prompt is a beep/tone wav. This works and looks like a viable workaround, I was wondering if it was possible to make the timeouts very short to prevent any unnecessary delay.

    The VAD prevents me from inputting anything less than 1 second for each of the timeouts, I was wondering if I can edit the vxml to force a shorter timeout. The vxml is:

    <?xml version="1.0" encoding="UTF-8"?>
    <vxml version="2.0" application="Root_FletchersFeb13.vxml">
    <catch event="error.semantic">
    <assign name="project$_CurrentErrorName$" expr="_event" />
    <assign name="project$_CurrentErrorDescription$" expr="(_message == undefined ? '' : _message)" />
    <goto next="selfserve_ErrorHandler.vxml" />
    <assign name="project$_CurrentErrorName$" expr="_event" />
    <goto next="selfserve_ErrorHandler.vxml" />
    <catch event="connection.disconnect telephone.disconnect">
    <goto next="selfserve_DisconnectHandler.vxml" />
    <var name="application.selfserve_userInputComponent1_Result" expr="''" />
    <var name="application.selfserve_userInputComponent1_Buffer" expr="''" />
    <form id="userinput">
    <property name="bargein" value="true" />
    <property name="timeout" value="1s" />
    <property name="interdigittimeout" value="1s" />
    <property name="termtimeout" value="1s" />
    <property name="termchar" value="#" />
    <field name="userinput">
    <catch event="nomatch noinput" count="1">
    <assign name="selfserve_userInputComponent1_Result" expr="(_event == 'noinput' ? UserInputResult_Timeout : UserInputResult_InvalidDigits)" />
    <assign name="selfserve_userInputComponent1_Buffer" expr="(application.lastresult$ == undefined ? '' : application.lastresult$.utterance)" />
    <goto next="selfserve_MF_userInputComponent1_Invalid_Input.vxml" />
    <assign name="selfserve_userInputComponent1_Result" expr="UserInputResult_ValidDigits" />
    <assign name="selfserve_userInputComponent1_Buffer" expr="(application.lastresult$ == undefined ? '' : application.lastresult$.utterance)" />
    <goto next="selfserve_MF_userInputComponent1_Valid_Input.vxml" />

    Can I amend the xml for example to say

    <property name="timeout" value="0.2s" />

    or maybe

    <property name="timeout" value="200ms" />

    I know this would have to be reapplied every time the project is deployed but I can live with that since it does not have to be changed during testing...

  2. VAD_Support

    VAD_Support Active Member

    Aug 6, 2009
    Likes Received:
    Hi Millsey,

    That's a very clever solution, thanks for sharing.

    Yes, you can use the syntax you mentioned to reduce the timeouts. The value could be 10ms for example for 10 miliseconds. You can create a script to replace the content of the vxml file after each build without needing to manually edit the file each time.

Thread Status:
Not open for further replies.