Automatically reprompt Voice Gatway caller after a period of inactivity

Challenge

You want to automatically output a message to a caller after the caller has not triggered an input (=said anything) for a period of time.

Solution

In order to achieve the above, you need to use two Cognigy.AI concepts together:

  1. Voice Gateway Session Parameters for User Timeout
  2. Rule Intents

Step 1: Session Parameters for User Timeout

Start by adding a VG Set Session Params Node to your Flow and set the parameters as below.

mceclip1.png

This will cause Voice Gateway to send an event to Cognigy after 5000ms of inactivity (=silence) on the caller side.

You could set a No User Input Prompt here as well and not have an event sent to the Flow and you'd be done. It could be more flexible to handle this event in an Intent though, as shown below.

 

Step 2: Rule Intents

Add a new Rule Intent and add the following intent rule:

input.data.request.activities[0].name === "noUserInput"

This Intent will now always trigger when a noUserInput event hits Cognigy.AI and you can handle it as you see fit, for example with a Default Reply or in an Attached Flow for more complex logic.

 

Optional: Create dynamic reprompts

You could create fully dynamic reprompts by storing the reprompt message in the Context in your Flow and then outputting it from the Context in a Default Reply. In that way the reprompt can change, depending on where the caller is in your Flow.


Comments

0 comments

Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful