DTMF tool for assistant
# support
a
im using vapi as provider for my assistant because im using the workflows for conversation logic everything was fine until i realized that most of the outbound calls that i make have a voice machine on the other end that asks to dial specific digit i think the overall logic to understand which digit to dial is easy but i am not sure how to add the DTMF tool to my assistant Do i simply add it from tools ? What fields should I modify to explain what exactly to dial? Im using the vapi as provider (not openai) I provided the screenshots of DTMF tool in vapi dashboard's tools section I am not sure what do i need to type in to 'descriptions' 'parameters' and 'messages' sections For now, by just simply using this empty DTMF tool, my assistant was not able to dial anything Please help me in resolving this, its a main blocker for our use case https://cdn.discordapp.com/attachments/1358636979918475366/1358636980287705168/Screenshot_2025-04-07_at_11.56.53_AM.png?ex=67f490ca&is=67f33f4a&hm=06918c2dc686921730b9fdf6d916e5868d1c758ed39ef7eb14c0f9c8d567a56d& https://cdn.discordapp.com/attachments/1358636979918475366/1358636980581433485/Screenshot_2025-04-07_at_11.57.08_AM.png?ex=67f490ca&is=67f33f4a&hm=155a682b0bb217f79ed67836640611743eccedd8f63163dd211aeb966fdd2c28&
v
Hi there! 👋 I understand you're having trouble configuring the DTMF tool for your Vapi assistant to handle outbound calls with voice menus. I wasn't able to find specific information about what exact parameters to configure for the DTMF tool. However, I can definitely help with the other aspects of your configuration! Here's how to configure your DTMF tool: ### Adding the DTMF Tool You're on the right track! You need to add the DTMF tool from the tools section in the Vapi dashboard, which you've already done by creating the
dtmf_tool
. ### Description Section For the description section, you should provide context about the tool's purpose. Based on the information I found, you could use something like:
Copy code
Use this function to dial digits on a keypad when navigating voice menus or responding to automated prompts. The assistant can enter specific digits as requested by the voice system.
You might also want to add this warning to prevent the model from modifying user input:
Copy code
[Warning]
Do not modify or attempt to correct user input parameters or user input. Pass them directly into the function or tool as given.
According to [Discord conversations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343641783367766088), adding context to the tool description helps the model understand how to use it properly. ### Messages Section For the messages section, you should configure the following message types: - `request-start`: Message played when the DTMF action begins - `request-complete`: Message played when the DTMF action completes - `request-failed`: Message played if the DTMF action fails - `request-response-delayed`: Message played if there's a delay According to [Discord information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341585041624666122), if no start message is provided, Vapi defaults to using random filler messages like "Hold on a sec", "One moment", etc.
You can set these messages via the API with a curl command:
Copy code
curl --location --request PATCH 'https://api.vapi.ai/tool/toolId' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '{
  "messages": [
    {
      "type": "request-complete",
      "content": "I've entered the digits."
    },
    {
      "type": "request-failed",
      "content": "I was unable to enter the digits."
    },
    {
      "type": "request-response-delayed",
      "content": "Still working on entering the digits."
    },
    {
      "type": "request-start",
      "content": "I'll dial those digits for you now."
    }
  ]
}'
### Async Option I noticed in your screenshot that the "Async" option is enabled. According to [Discord information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334866220624908341), this means "Tool executes asynchronously." When set to true, the tool will trigger functions without waiting for their responses. If you want to use the "call response" feature, you should set this to false according to [Discord information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1340737584309211136). ### System Message Configuration Make sure your assistant's system message instructs it to use the DTMF tool when encountering voice menus. For example:
Copy code
You are an assistant that makes outbound calls. When you encounter a voice menu or automated system that asks you to press a specific digit, use the dtmf function to enter the digits.
Is there anything else you'd like to know about configuring your DTMF tool? Sources: - [Discord conversation about tool descriptions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343641783367766088) - [Discord conversation about setting messages](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341585041624666122)
a
where do i need to enter the below part? "You are an assistant that makes outbound calls. When you encounter a voice menu or automated system that asks you to press a specific digit, use the dtmf function to enter the digits."
k
@Sahil will assist you when available thanks for your patience 🙏
a
thank you, ill wait also some more questions: where do i need to explain the assistant what type of digits to dial? Its mostly simple cases with 2,3 options like: 1 for all orders 2 to update orders etc i want the assistant to dial the one that is for "all orders" for every number the voice machine will be a little different, but they all have the same idea and my assistant needs to access the one that has information about all orders thank you!
@Sahil @User can i know when to expect the reply approximately? thanks!
v
Message marked as helpful by @alisher1860! 🎉
k
Sorry for the inconvenience, yesterday was weekend @Sahil will be available soon when online thanks 🙏
k
checking if this is resolved/solved for you?
a
not resolved, waiting for the response from @Sahil
s
Hi @alisher1860, the DTMF tool isn't stable right now, so it won't meet your needs at the moment. However, it's on our roadmap, and we plan to address and improve it soon.
a
dtmf tool in general or specifically in workflows? because i think it 'kinda' works if provider is openAI
@Sahil
s
It is general, you can use it with workflows or you can use it in the assistant.
a
@Sahil apart from the part that its isnt stable right now can you please take a look at the screenshots and point out how exactly i need to fill the parameter of dtmf tool? when i use openai as provider i simply provided the prompt to use dtmf tool to dial specific digits but when i use the same tool in workflows, seems like assistant has no idea of how to dial numbers what fields in workflow i might need to fill additionally? will apreciate any help
s
You just need to add the DTMF tool and through prompt you need to provide what number you need to press
and it will do the trick
a
@User can you help out with it? i mean i understand for openai provider, the logic can be simply added to the prompt but in case of workflows, how can i tell the assistant to press the number, should i use it in say prompt? it doesn't seem right or how can i add the condition to check if its a automated voice or not sorry for long conversation, i just want to figure this out https://cdn.discordapp.com/attachments/1358636979918475366/1358814480771059792/Screenshot_2025-04-07_at_23.41.44.png?ex=67f53619&is=67f3e499&hm=6ebf6b22374258c314d70eea3d3174030080242fbc742177d081b3d11aec9279&
s
You just need to write that in the assistant prompt, You need to press 1 when someone says X or following condition is met.
but you can do the same with workflow.
like what's the exact thing you are missing over here?
a
@User yep, so when the call is made, there will be voice machine on the other end, so i can want to add a prompt or something to tell assistant something like (You need to press 1 when someone says X) and AFTER that to have the say node that is given on the screenshot question is: where should i write this prompt? im currently writing it in global prompt but there is no success, assistant cant do the thing that openai provider is doing i thought maybe adding the additional say node, but i dont need the assistant to say anything, right? i rather need it to gather info? im a bit confused by that because workflows dont have simple prompts as the openai ones do
@Sahil @Kings_big💫 Is it possible to help me out with the above? sorry for bothering too much, i just thought if basic dtmf usage example for workflows is be provided , it will be very helpful thanks!
k
@Sahil will assist you when available thanks for your patience
s
Can you send me the call_id and adding on global prompt section should help.
a
cd09ea0f-3652-49ad-aaaa-400c991d0851 globla prompt: "You are an assistant that makes outbound calls. At the beginning of the conversation, you will encounter a voice menu or automated system that asks you to press a specific digit. You need to wait for some time before speaking at the very beginning, in order to understand if there is a automated system on the other end. If there is, and it asks to dial some digit, use the dtmf function to enter the digits. You need to press the digit that corresponds to all available loads or all available orders. I do not know the exact naming, but it should give information about loads/orders. after that, continue the conversation as usual if there is no automated service at the other end, just start the conversation by following the workflow." @Sahil
s
Thanks let me take a look
Can you try using global prompt in assistant rather than workflow?
a
where should i input it? does it mean that i need to use provider other than vapi? @User
k
To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!