multiple-amethyst•5mo ago
Voice agent hanging after successful function return
Hi team. I am building a scheduling agent. It calls Make webhooks to perform the scheduling. However, the voice agent hangs/stalls when getting the availability (busy times) from the Make function call. She just goes quiet.
I asked the voice agent to read the response from the function call and the value is correct. Make logs are also correct. I adjusted the prompt to read that immediately after the function response, the voice agent should calculate available times and offer two time slots to the user. But, the voice agent just hangs.
I get the "Got it" response back from the VAPI function, showing that VAPI has received a successful function webhook return value. However, no error code. No Make error. Data is passed. But the voice agent just hangs/stalls.
Assistant: Inspire Appt Setter 2
Tool: inspireCheckAvailability
What do you recommend in debugging? I have invested many hours already and tried many different ideas. What's most strange is after several quiet seconds, if I say "what did you find?" or "what are my options?", then the voice agent continues normally providing available times as calculated and continues with the remainder of the prompt actions.
Your suggestions are welcomed. Thank you.
5 Replies
To help prevent the Vapi voice agent from hanging after a function call, ensure your webhook returns a JSON response in this format:
This structure prompts Vapi to play a success message to the user after the function call, which may resolve the hanging issue. Double-check for correct formatting and matching toolCallId in your response.
Source:
- Discord Vapi Community Prompt configuration after function call return
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
foreign-sapphire•5mo ago
having same issue. here is the response body i got back
{
"result": [
{
"toolCallId": "call_CtuSpshUlZnywM0o5IFT1Pfy",
"name": "checkAvailability",
"result": "Great, your preferred date and time is available"
}
]
}
@Vapi Teammultiple-amethystOP•5mo ago
That extra "name" value did not solve the problem. Actually, it make it worse. The agent now can't calculate availability times from a list of busy times. So, the stall happens, then I finally say:
Transcript
AI
Checking. Got it.
[long pause, then I say]
User
Got what?
AI
Thank you for your patience. I am checking the next 2 available time slots for your call. Would you like to continue?
User
That's why I called this 1. [Actually, I said "that's why I called in".]
AI
Thank you, Barney. Here are the next 2 available 30 minute time slots for your call. 1 is slot 1. 2 is slot 2. Which 1 would you prefer? [What is this silly response?]
Can you transfer to a human agent?
Hey! 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!
This would really help us figure out what went wrong!
multiple-amethystOP•5mo ago
There's been too many problems with VAPI hallucinating. Thanks anyway, but I'm switching to Bland or another high-performing voice AI. Good luck!