Timur
09/18/2024, 2:21 PMjavascript
const DTMF = {
async: true,
type: "dtmf",
function: {
name: "dial-keypad-tool",
description: "Use this function to dial a number",
parameters: {
type: "object",
properties: {
key: {
type: "string",
description: "The DTMF symbols to dial",
pattern: "^[0-9*#]+$",
},
},
required: ["key"],
},
},
}
Problem is it's seems like the system does not accept my values.
Example from the call:
{
"role": "tool_calls",
"time": 1726668938896,
"message": "",
"toolCalls": [
{
"id": "call_MiOXIq1q3Fbri5cnvv2IPI9n",
"type": "function",
"function": {
"name": "dial-keypad-tool",
"arguments": "{\"key\": \"4\"}"
}
}
],
"secondsFromStart": 86.003
}
{
"name": "dial-keypad-tool",
"role": "tool_call_result",
"time": 1726668938904,
"result": "Success.",
"toolCallId": "call_MiOXIq1q3Fbri5cnvv2IPI9n",
"secondsFromStart": 86.011
}
What I doing wrong?
Also, how to debug it proper? What kind of data vapi waits to send to the 3rd-party call system?Vapi
09/18/2024, 2:23 PMdial-keypad-tool function is being called correctly with the DTMF symbol "4" and is executing without errors.
If you're experiencing issues despite the successful execution message, it could be due to several reasons:
1. The DTMF tones might not be reaching the third-party call system as expected.
2. There could be a mismatch between the expected input format of the third-party system and the format you're sending.
3. The third-party system might require additional information or a specific sequence of commands.
To debug this properly, you can:
- Check the documentation or API reference of the third-party call system to understand the expected input format and requirements for DTMF tones.
- Ensure that the dial-keypad-tool function is correctly interfacing with the third-party system's API.
- Verify that the network connection between your system and the third-party system is stable and allows for real-time communication.
- If possible, log the raw input and output data between your function and the third-party system to identify any discrepancies.
For the data that VAPI expects to send to the third-party call system, it typically includes the DTMF tones in a format that the system can recognize and process. This often involves sending the tones as a string of characters representing the keys pressed, which seems to be what you're doing.
If you continue to face issues, please provide more details about the specific problem you're encountering, and I'll do my best to assist you further. If the problem is beyond the scope of our discussion, you may need to ask support for more info on this.Vapi
09/18/2024, 2:23 PMVapi
09/18/2024, 2:23 PMTimur
09/18/2024, 2:24 PMShubham Bajaj
09/19/2024, 8:13 PMTimur
09/20/2024, 7:16 AMShubham Bajaj
09/20/2024, 4:44 PMTimur
09/20/2024, 6:55 PM