DTMF Inputs Outbound Call
# support
r
So I am looking to have my assistant speak to the user and then I am in need of collecting some digits from the user and then sending it off to a webhook. I have the tooling turned on and I have my webserver events setup, when I press the digits I am wanting and end the call I see nothing about this in the call ended object that gets sent to the webhook. 1. is it possible to send a webhook call as the digit is pressed? 2. is it possible to setup a webhook specifically for digit pressing? 3. does the build in DTMF method work or do I need to build a custom function for this? Some help would be greatly appreciated. https://cdn.discordapp.com/attachments/1348643934699524096/1348643935119081555/image.png?ex=67d0360a&is=67cee48a&hm=b22d761ac5550b52b092b4e5044cc0b072c3264723f8c617c58c02efcb602bd4&
s
VAPI has built-in support for collecting DTMF tones (digits pressed by users), but with specific behaviors: 1. **Built-in DTMF Method**: Yes, VAPI has a built-in DTMF collection system that works through the
keypadInputPlan
configuration in your assistant. 2. **Webhook for each digit press**: Currently, VAPI doesn't have a built-in webhook that triggers immediately when a single digit is pressed. Instead, DTMF digits are collected according to your
keypadInputPlan
configuration and then added to the conversation as a user message. 3. **How DTMF handling works**: - When a user presses a digit, it's added to a buffer - The digits are processed based on: - Timeout: After a configurable number of seconds (default 2) - Delimiters: When the user presses a configured delimiter (default # or *) - Once processed, the digits are added to the conversation as a message: "User's Keypad Entry: [digits]" Use the built-in keypadInputPlan with regular function tools
Copy code
json
"keypadInputPlan": {
  "enabled": true,
  "timeoutSeconds": 2, // Can be 0-10 seconds, or omitted for default
  "delimiters": ["#", "*"] // Can customize or use empty array
}
With this configuration, when users press digits: 1. The digits are collected 2. After triggering conditions are met (timeout or delimiter), they're added to conversation 3. Your assistant can use those digits and send them via a function tool webhook ## Recommended Implementation 1. **Enable keypadInputPlan in your assistant configuration**:
Copy code
json
"keypadInputPlan": {
  "enabled": true,
  "timeoutSeconds": 2,
  "delimiters": ["#"]
}
2. **Create a function tool to receive digits**: - Set up a webhook URL that will receive the collected digits - Create a function tool with appropriate parameters for your digit collection needs - Configure your assistant to use this tool after collecting digits 3. Program your assistant to: - Ask the user to input digits - Wait for digits to be collected via the keypadInputPlan - Pass those digits to your function tool which will send them to your webhook This approach leverages VAPI's built-in DTMF handling while giving you a way to send the collected digits to your webhook. Let me know if you need further assistance implementing this solution for your specific use case!
9 Views