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.