Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Bug with Dialogflow not sending the DTMF input correctly in $last user input variable to Generator

Hi,

I've found a bug with Dialogflow CX when using DTMF inputs over voice and a Generator. I'm using a Generator which looks at the past conversation and last user utterance to decide on what response to give to the user. I want to respond on free text and DTMF input from the user as our voice system accepts voice and DTMF input of booking reference which is a 6 digit number so works for both.

$last-user-utterance and $conversation outlined here; https://cloud.google.com/dialogflow/cx/docs/concept/generators

The generator is fairly straightforward and the prompt is not relevant except for the part that uses the $last-user-utterance

Prompt

"You are an AI assistant specializing in booking reference validation. Your primary function is to guide users towards inputting the correct booking reference number........

User: $last-user-utterance
Agent:"

Everything is working as expected until I want to pass a DTMF input over to the Generator and this is the bug, the $last-user-utterance variable is empty so it seems that any DTMF inputs are treated differently. This may be by "design" but even if that is the case, how can I actually access this value to send to the Generator? Whats even stranger is that when I look in the $conversation parameter also being passed to the Generator the DTMF inputs are in the conversation.

Also for some reason there is no way to access the dtmf input at page/route level or anywhere else,  so it's impossible to fix this issue. I was thinking if i had access to them I could pass them into the Generator manually.

 
Any help would be much appreciated.
 
thanks
0 1 173
1 REPLY 1

Hi  @adrianthompson ,

Welcome to Google Cloud Community!

Based on your description, it seems like the $last-user-utterance variable isn't capturing DTMF inputs correctly. This could be by design since DTMF inputs are tones, not text.

Here are key considerations you might consider to troubleshoot and potentially resolve this issue : 

  • Check DTMF Configuration -  Ensure that DTMF is properly configured in your Dialogflow CX agent. Verify that DTMF inputs are enabled and correctly mapped to text inputs.
  • Use Parameters  - Rather than depending on $last-user-utterance, use parameters to capture and store DTMF inputs. Define a parameter for the booking reference number and assign its value when DTMF input is detected.
  • Debugging - Use the Dialogflow CX simulator to test and debug your agent's behavior with DTMF inputs. This can help you identify where the issue might be occurring.

If the issue persists, I suggest contacting Google Cloud Support as they can provide more insights to see if the behavior you've encountered is a known issue or specific to your project.

I hope the above information is helpful.