how to tell assistant to press keys?
# support
a
For example, if I make an outbound call and the destination IVR says press 1 for sales 2 for marketing and won't move until a key is pressed. or for some inbound calls asking my assistant to press 1 to answer or 2 to decline the call. is there a way to instruct assitant to press keys ? or build a tool for assistant to call? Thanks.
v
You can continue this conversation by mentioning me in the message.
@alexalex1960 Yes, you can definitely instruct your assistant to interact with phone systems that require DTMF tones, which are the sounds associated with key presses on a telephone. For outbound calls, you can program your assistant to listen for specific prompts and then send the appropriate DTMF signal. Similarly, for inbound calls, your assistant can be set up to respond to prompts by pressing the required keys. To build a tool for the assistant to make calls and interact with IVR systems, you would need to integrate telephony capabilities that support DTMF. This would involve using APIs that allow for call control and sending DTMF commands. If you need assistance with setting up such a tool or have any specific requirements, please let me know, and I can provide more detailed guidance or direct you to the right resources.
a
I see. where can I find more documents about sending DTMF tones?
@Vapi my assistant only gets one type of incoming calls, the caller always asks my assistant "press 1 to answer, press 2 to decline". how do you suggest me to use DTMF to answer the calls? what documents should I read?
v
@alexalex1960 To handle the specific scenario where your assistant receives incoming calls that require pressing "1" to answer or "2" to decline, you would need to set up your assistant to automatically send a DTMF tone for "1" when it detects an incoming call. Here's a general approach to achieve this: 1. **Event Detection**: Your assistant should be configured to detect an incoming call event. 2. **DTMF Sending**: Upon detecting the call, the assistant should send the DTMF tone for "1" to answer the call. For documentation, you would typically refer to the API or SDK documentation provided by the telephony service or Voice API platform you are using. This documentation should include details on how to send DTMF tones through their system. Since you are using VAPI (Voice API), you should look for sections in the VAPI documentation that cover: - Handling incoming calls - Responding to IVR systems - Sending DTMF tones The exact method to send a DTMF tone will depend on the capabilities of your Voice API platform and how it allows for call control. If you provide me with the specific platform you are using, I can give you more precise instructions or point you to the relevant section of the documentation. If your platform supports it, the process might involve setting up a webhook to receive incoming call notifications and then responding with a command to send the DTMF tone. This could be part of the call flow configuration where you define how the assistant should handle different call events. If you need further assistance with the implementation or cannot find the documentation, please let me know, and I can help guide you through the process or direct you to support for more detailed information.
a
@Vapi I am using VAPI and purchased the number through VAPI from twillio
v
@alexalex1960 Great, since you're using VAPI and have purchased a number through it from Twilio, you can set up your assistant to automatically send a DTMF tone when it receives an incoming call. Here's a simplified step-by-step guide: 1. **Configure a Webhook**: Set up a webhook in your VAPI dashboard to handle incoming calls to your Twilio number. This webhook will be triggered every time there's an incoming call. 2. **Create a Call Flow**: In your call flow configuration, specify that when an incoming call is detected, the assistant should send a DTMF tone of "1" to answer the call. This is usually done by responding to the webhook with a set of instructions that VAPI can interpret and execute. 3. **Respond with DTMF**: The response to the webhook should include a command to send the DTMF tone. In many Voice API platforms, this is done by returning a specific XML or JSON payload that includes a DTMF action. For example, your response might look something like this in JSON format:
Copy code
json
{
  "actions": [
    {
      "action": "talk",
      "text": "Please wait while we connect your call."
    },
    {
      "action": "input",
      "dtmf": {
        "digits": "1"
      }
    }
  ]
}
This is a hypothetical example, and the actual syntax will depend on VAPI's specific requirements. 4. **Read the Documentation**: To get the exact details on how to set this up, you should read the VAPI documentation related to handling incoming calls and sending DTMF tones. Look for sections on webhooks, call flows, and DTMF actions. If you're not sure where to find this information in the documentation or if you need help with the setup, please reach out to VAPI support for more detailed guidance. They can provide you with the specific steps and code examples for your use case.
a
for anyone else who may stumble on this, there is a dialKeypad function, simplely calling that is enough
s
@alexalex1960 you can use dtmf tool for sending key presses or dtmf tones using the similar way other tool calls are made. lmk if you require further help.
can you share the call id?
a
ac004c62-8079-493b-b4a4-2ac9e48d3928 here is a call id from yesterday. I instruct my assistant to "when you hear " press 1 to accept or 2 to decline", use dialKeypad function to enter "1" to accept the call. ". but it only works half the time.
@Shubham Bajaj if you have docs about DTMF, please share. I searched but didn't find much on vapi documents
s
@alexalex1960 try setting model temprature to 0.3 and use openai gpt-4o-/gpt-4o-mini.
a
@Shubham Bajaj Thanks, I will give it a try.
9 Views