endCall function and assistant not following expli...
# support
s
I want my assistant to end a call appropriately once the conversation is finished, specifically to hang up so it doesn't continue using Vapi credits while waiting for the callee to disconnect. So far, the only way I’ve found to do this is by enabling the endCall function and explicitly referencing it in the prompt. For example: [Ending the Call] Make sure to call the endCall function when the conversation ends and hang up. The assistant typically does not ask for an email address during the call, which is exactly what I want—so that part is working perfectly. Also, the bot has no access to any email information associated with the numbers it’s calling. However, no matter how I phrase the prompt, the assistant always ends the call by saying: "You will receive a confirmation email shortly." This happens even though no email was mentioned or provided. I've tried prompting in various ways, but it seems the assistant is unable to end the call without adding that phrase. If it tries to end the call without saying this phrase, it says "Now I will end the call" like a robot, but actually doesn't hang up. It falls into a loop. If I keep on speaking to it saying "ok....bye", it just repeats itself. Until at some point it goes back to mentioning an email follow-up and THEN hang up. What am I doing wrong? Is there a better way to ensure the assistant ends the call gracefully without mentioning a follow-up email? I’d appreciate some guidance.
v
Try adding specific instructions to override the default end-call behavior by modifying your system prompt:
Copy code
[Call Ending Protocol]
When ending the call:
1. Say only: "Thank you for your time. Goodbye."
2. Do NOT mention any emails, confirmations, or follow-ups
3. Then trigger the endCall function
This explicit instruction should override the default behavior and prevent the assistant from mentioning confirmation emails. Source: - [Discord discussion about endCall issues](https://discord.com/channels/1211482211119796234/1313293840580612166)
c
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!
2 Views