End-of-Call function issue
# support
d
Hi, I have created a Vapi assistant (inside Vapi) with End-Of-Call function. But the issue is that with this function it doesn't follow the prompt at all, it just always ends the call immediately. How can this be fixed? I will be grateful for any help. Here is system prompt example: Ask if the person is John. If confirmed, say thank you and end the call. If not confirmed, say: "Sorry, I got the wrong number" and end the call. If there is any other questions, you just say: I'm looking for John. Examples: Example 1 - Hi, are you John? - No, I'm Alex. - Sorry, I got the wrong number. Bye! end the call Example 2 - Hi, are you John? - Yes, I'am. - Thanks, John. Bye! end the call Example 3 - Hi, are you John? - Who's asking? - I'm looking for John. Bye! end the call End-of-call phrase: "bye". But whatever it was in the conversation, it just immediately end the call just saying "bye".
v
message has been deleted
@Dimitri A It sounds like there may be an issue with the logic flow in your assistant's script or the conditions set for ending the call. To address this, you'll need to review the script and ensure that the end-of-call function is only triggered after the appropriate dialogue has taken place, based on the conditions you've outlined. Here are some steps you can take to fix the issue: 1. **Check the Conditions**: Ensure that the conditions for ending the call are correctly set up. The script should only trigger the end-of-call function after confirming the caller's identity or after stating that you have the wrong number. 2. **Review the Script Flow**: Go through the script to make sure that the dialogue flows as intended and that the end-of-call function isn't called prematurely. 3. **Test the Assistant**: After making adjustments, test the assistant to see if it now follows the correct prompt before ending the call. 4. **Debugging**: If the issue persists, you may need to debug the assistant's code to identify where it's going wrong. If you're still having trouble after trying these steps, please provide more details about how your assistant is set up, including any relevant code snippets or configurations, so I can assist you further. If the issue is beyond the scope of this support, you may need to ask for more info from the Vapi support team.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
d
No, you can see that I have created the simplest system prompt possible to test it. But nothing changed.
And everytime when I enable end-of-call function, I'm getting an error "exiting meeting because room was deleted"
s
Hey make changes in your prompt to make bot understand how to determine if john or not john. checkout the following: https://docs.vapi.ai/prompting-guide
As you have said, endOfCall functions is triggered each time. Please make change in your prompt and it will work.
d
uuuhhh, sorry guys, but what kind of changes you mean? I even have examples in the prompt! It doesn't work.
s
Share the call id I will ping you the exact issue, but still LLM is unable to differentiate b/w if confirmed as john or not john by looking at the prompt. LLM differentiates correctly b/w john or not-john.
d
Sorry, but it doesn’t seem to be true. LLM can not solve such a simple task? Really? I‘ll share call ID asap. But in the mesnwhile there is another option, even if „John“ wasn‘t confirmed. Actually, Vapi just ending the call after any phrase. And that‘s the issue.
s
I can't say more from outside please share the call ids.
d
Here is 3 different call scenarios, but with the same result: 3d48acdf-2870-4e29-97d6-7149cb251ff7 5b0faa2c-4cd8-4def-96a9-0c7f06a43b28 627e95ff-ff5e-4ede-81b7-1d9e7234fa9d
s
Hey @Dimitri A I checked the logs, and Yes phrases " thank you" and "Sorry, I got the wrong number" are not voiced-out/spoken. As per your prompt and LLM it correctly ends the call but not uttering your few messages, refactor your prompt and it will work.
> prompt_template [TASk] [CALL CLOSING] - Trigger the 'endCall' function
d
I tried everything. It just doesn‘t work.
s
Share your updated prompt.
Hey @Dimitri A is it resolved?
d
Nope. And I see here that I'm not the only one with this issue. And what we are doing here - just time wasting.
s
Hey check DM.
3 Views