$dialer.setNoInputTimeout
This method allows you to change the default timeout (5 seconds) for a speechNotRecognized
event in a specific state.
caution
This method is not supported for telephony channels where the ASR provider is connected via the MRCP protocol.
Syntax
The method accepts an integer value for the timeout, in milliseconds.
$dialer.setNoInputTimeout(15000);
How to use
state: Feedback
a: Thank you for your time! Could you leave a short review of my work?
script:
$dialer.setNoInputTimeout(15000);
state: GetFeedback
event: noMatch
a: All right, goodbye.
script:
$analytics.setSessionData("Feedback", $parseTree.text);
$dialer.hangUp();
state: NoInput || noContext = true
event!: speechNotRecognized
a: I’m sorry, there’s something wrong with the connection. Could you repeat that?
Details
-
Allowed values: from
1000
(1 second) to20000
(20 seconds). If you set this value over the limit, the maximum timeout of 20 seconds will be used. If you set this value below the limit, the minimum timeout of 1 second will be used. -
The
$dialer.setNoInputTimeout
method works only in the state where it was called. To change the timeout in other states, you need to call this method again there or use thepostProcess
handler:bind("postProcess", function($context) {
$dialer.setNoInputTimeout(15000);
});