Create DTMF Tool
# support
r
Hi everyone, I’m having trouble creating a DTMF tool and could use some help. In my healthcare use case, I make outbound calls on behalf of patients. I already have the necessary information, like card numbers and PINs. My issue is that my AI Agent used to be able to navigate IVR systems by pressing buttons (DTMF tones), but now it’s stopped working. Instead of pressing the buttons during the IVR menu, it just speaks. I’ve included the JSON code I’m using below, but I have a few questions: The IVR menu changes frequently. For example, it might say, “For service in English, press 2.” How can I build logic to ensure the agent still picks the correct option when the menu changes? I use n8n for automation. How do I add this tool to my assistant? There’s no external data involved in this tool—I just need to re-enable my AI Agent to press buttons during calls. Any advice would be appreciated! curl -X POST https://api.vapi.ai/tool \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "async": true, "type": "dtmf", "messages": [ { "type": "request-start", "content": "press 1 for service in english" }, { "type": "request-start", "content": "please enter your {{card_number}}" }, { "type": "request-start", "content": "please enter your {{pin_number}}" }, { "type": "request-start", "content": "To speak to accounting please press 2" }, ] }'
v
@rahmani Hello! I'm glad to assist you with creating a DTMF tool for your healthcare use case. Let's address your concerns one by one: 1. Adapting to IVR Menu Changes: To ensure the agent picks the correct option when the IVR menu changes, you can implement dynamic decision-making logic. This could involve using speech recognition to listen to the IVR prompts and then using natural language understanding to interpret the options and select the appropriate DTMF tone based on the recognized text. This way, even if the menu changes, your agent can still understand and respond correctly. 2. Integrating with n8n: To add this tool to your assistant within n8n, you would typically use an HTTP Request node to make a POST request to the VAPI endpoint. You would set up the node with the appropriate headers, method (POST), and body content (your JSON payload). Make sure to replace
YOUR_TOKEN
with your actual authorization token. Regarding the JSON code you've provided, it seems like you're on the right track. However, if your AI Agent is speaking instead of sending DTMF tones, there might be an issue with how the tool is being called or with the configuration of your assistant. Please ensure that the "type" is correctly set to "dtmf" and that the assistant is configured to use DTMF tones instead of voice when interacting with the IVR. If you're still experiencing issues, please provide more details or error messages you're encountering, and I'll be happy to help you troubleshoot further. If you need immediate assistance with the VAPI platform specifics, you might want to reach out to the support team for more detailed guidance.
You can continue this conversation by mentioning me in the message.
s
@rahmani Currently, our DTMF tones and keypress playback is not consistent due to IVR navigation potentially failing more frequently than expected, leading to increased failures. We are working on a solution that will allow proper IVR navigation, which will be launched by the end of this quarter. Until then, you will need to first navigate the IVR yourself using Twilio Flex before transferring the call to VAPI.
7 Views