Tool call does not get triggered during phone call...
# support
u
callId - d6fd59e6-a06a-4995-b4a2-443fa67c76d8 response expected - Statement "you are awesome" or at least a ping to my endpoint response actual - Just generic response as the agent "figures" out what i was asking
v
2. **Verify JSON Response Format**: Make sure your endpoint returns the correct JSON format that VAPI expects:
Copy code
json
{
"results" : [ {
"toolCallId":"1. message.toolCalls[].id",
"result":"Whatever you want to send back to the tool"
}
]
}
3. **Check Network Configuration**: According to [troubleshooting information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334919245468799007), verify that your network allows traffic on the SIP protocol and that any firewalls or NATs are configured to allow SIP messages to pass through. 4. **Review Call Logs**: Examine the logs associated with your call ID to identify any patterns or issues that could be causing the problem. Would you be able to share any additional details about your tool configuration or any error messages you might be seeing in your logs? This could help narrow down the specific issue you're facing! 🔍 Sources: - [Discord discussion about tool calls not triggering during phone calls](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334666797932089405) - [Discord information about client-side vs server-side tool calls](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342336047589359618) - [Discord discussion about model speaking tool call code](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331648945818177586) - [Discord thread about response relay problems](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343933426721488896) - [Troubleshooting information about network configuration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334919245468799007)
Hi there! 👋 I see you're having an issue with tool calls not triggering during phone calls, while they work fine with web calls. Unfortunately, I can't analyze your specific call ID in detail, but I can definitely help with information about this known issue and some troubleshooting steps! According to [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334666797932089405), this exact issue has been reported by other users - tool calls working in web calls but not in phone calls. There are several potential causes for this: ## Known Issues 1. **Client-side vs. Server-side Tool Calls**: Web calls use WebRTC data channels for client-side tool calls, while phone calls handle tools differently. According to [Discord information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342336047589359618), this fundamental difference can affect tool call triggering. 2. **Model Behavior Issues**: In approximately 20% of cases, the model might speak the internal VAPI tool call code instead of executing it, particularly with the
transfer_call
tool, as noted in [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331648945818177586). 3. **Response Relay Problems**: Some users report that the assistant makes tool calls but doesn't automatically relay responses back to the caller, requiring additional prompting, as mentioned in [Discord threads](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343933426721488896). ## Troubleshooting Steps 1. **Check Tool Configuration**: Ensure your tools are properly configured in the
assistantOptions
object. For example:
Copy code
javascript
tools: [{
  "type": "function",
  "function": {
      "name": "your_tool_name",
      "description": "Description of your tool",
      "strict": true,
      "parameters": { ... }
  },
  "async": false
}]
u
@User I am developing on local using ngrok for reverse proxy. I do have "strict": false on mine, is that an issue? The main thing that is noticeable on the logs (both app and ngrok) is that there are no attempts to even try to reach the endpoint (server.url) compared to the web ui call where you'll see that there is an attempt to do a POST request to the endpoint.
a
all my tool calls stopped working in the past couple hours
u
for phone calls? did it ever affect web ui calls for you? has it come back online on your end?
s
@amurgio please create a new support ticket for your issue
k
You need to change your model from GPT 3.5 Turbo to either GPT 4.0 or GPT 4.0 mini and also work on prompting which is a pure prompting and model problem not related to VAPI. So yeah rework on your prompt and even if after rework doesn't works please change your prompt to GPT 4 or GPT 4.0 mini for prompting help you can checkout our VAPI prompting guide doc .
u
Can you explain what's the difference why it works on WebUI and not a direct phone call? I have the same prompt, I did the same response and the prompt is very simple ask the recipient a question and if he/she says yes you reach out to the tool. EDIT: - I've tried to change to gpt-4o and gpt-4o-mini as well - I've also followed your guidelines from the link you provided - I've tested on both, Web UI and direct to Phone and the web UI without fail will send a request to my webhook endpoint, but the phone call does not attempt to try to send a request at all. callid of the phone call cb64dc49-2a30-4da3-9923-bd5c27b88373 callid of the web call 43bb9a2c-584c-4451-84b1-1bc6ad19741c
@tejas
t
hm i actually see that the server webhook request succeeds on phone call, but fails with a 500 on the web call, meaning your server did not respond for the web call
u
@User Correct, but the issue is the other call does not even try to request
t
thats the thing i do see successful requests for that call
Server Message Successful. (https://ff9a-219-76-18-202.ngrok-free.app/api/callbacks/vapi). Response: {"result": "Your call has ended and saved."}
could be you arent handling it appropriately on your end?
u
correct, that's after the call has been hung up. at the end-of-call report, or before that happens.
@tejas @Shubham Bajaj any updates on this? can you point me to anyone i can speak with regarding this?
k
Hey! To help track down this issue, could you share: - The call ID - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!
I was under the impression that your ticket has been resolved. But please share the following information, and I'll help you with the solution.