Call being ended premanturely
# support
l
Has anyone experienced the Assistant ending calls too quickly? For example, if the AI is reading of a list of featured and the caller says "okay thats enough, thank you" the AI then goes to end the call. Any combination of endCall tool details, prompt details, endCallPhrases, etc that you have found to work well would be helpful!
v
It sounds like you're encountering a common issue with the Assistant ending calls prematurely! Here are some recommendations to help configure the
endCall
tool and manage endCallPhrases effectively in Vapi: ### Recommended Configurations for the
endCall
Tool 1. **Condition-Based Termination**: Set specific conditions for when the call should end. For example, you might want to avoid ending the call if the user says something like "that's enough" unless it's clear they want to end the conversation. You can configure it like this:
Copy code
json
   "content": "If the user is being rude or uses offensive language, terminate the call."
2. **Testing and Feedback**: Regularly test the Assistant's performance in real-world scenarios to ensure it only ends calls when appropriate. This helps avoid false positives. 3. **Speech Configuration**: Adjust the assistant’s speech settings to better handle background noise and interruptions. This can help prevent misunderstandings that lead to premature call endings. 4. **Monitoring Call End Reasons**: Use the "Ended Reason" reports to analyze why calls are terminated. This can help you refine your configurations over time. ### Effective EndCallPhrases Using the
say
method can help provide a courteous exit before ending the call. For example:
Copy code
javascript
vapi.say("Our time's up, goodbye!", true);
This ensures the Assistant communicates a closing message before the call ends. ### Example of Implementation You can set up your model to include the
endCall
function based on specific phrases:
Copy code
json
{
  "model": {
    "provider": "openai",
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "system",
        "content": "If the user says 'that's enough', do not end the call immediately."
      }
    ],
    "tools": [
      {
        "type": "endCall"
      }
    ]
  }
}
### Caveats
- **Complex Interactions**: Simple keyword triggers might not be enough. Consider using more advanced natural language processing to better understand user intent. - **Regular Updates**: Continuously monitor and update your configurations based on user interactions to improve reliability. By implementing these strategies, you should be able to reduce instances of the Assistant ending calls too quickly. If you have any more questions or need further assistance, feel free to ask! 😊 Sources: - [End Call Tool Documentation](https://docs.vapi.ai/tools/default-tools) - [Speech Configuration](https://docs.vapi.ai/customization/speech-configuration) - [Call Ended Reason Documentation](https://docs.vapi.ai/calls/call-ended-reason)
l
I've tried these solutions and they have no impact on solving the issue or making it any better :/
k
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
l
Sample call IDs: e9f832b7-cfb6-4206-b254-4b7ffa60766f 09ac1643-fd9a-4126-bb45-170ec7f46b2a e9bbd0a2-355c-4acc-b5cd-a49d1be2d7a3
k
It's a common issue when AI assistants interpret phrases like "that's enough, thank you" as a signal to end the entire call rather than just stop the current explanation. Based on your call examples, the AI is ending calls when users are actually trying to interrupt the current information flow but want to continue the conversation.
\## Effective Solutions \### 1. Modify Your System Prompt Add specific instructions about call ending behaviors:
Copy code
[Call Ending Protocol]
- Only end the call when the caller explicitly says goodbye, indicates they want to end the conversation, or confirms they have no further questions.
- Phrases like "that's enough" or "that's sufficient" when discussing specific topics should be interpreted as stopping that particular information flow, not ending the call.
- After interruptions, always ask if there's anything else the caller would like to know or discuss.
- Before ending any call, always explicitly confirm with: "Is there anything else I can help you with today?" and wait for a clear negative response.
\### 2. Handle Topic Transitions Explicitly Add instructions to handle interruptions explicitly:
Copy code
[Handling Interruptions]
When the caller interrupts your explanation with phrases like "okay", "that's enough", or "thank you":
1. Stop your current explanation
2. Acknowledge with "I understand" or "Sure"
3. Always ask a follow-up question like "What other information would you like to know about?" or "Is there something else about [relevant topic] you'd like to discuss?"
4. Only use the endCall tool when a user clearly indicates they want to end the entire conversation
\### 3. Custom endCallPhrases Configuration specify exact phrases that should trigger call endings:
Copy code
endCallPhrases: [
  "goodbye", 
  "bye", 
  "end the call", 
  "hang up", 
  "that will be all",
  "I'm done"
]
l
okay I will give this a try, previous attempts at updating the prompt have not been successful, I will try your exact langauge and see if that makes a difference
k
Let us know how that goes, a definite solution would be to specify exact phrases if adjusting your prompt does not work as shown above.
l
Can you provide an example of what you mean please?
k
Sure absolutely, you can specify custom end call phrases to anything you want, here's an example: endCallPhrases: \[ "goodbye", "bye", "end the call", "hang up", "that will be all", "I'm done" \]
l
Ah ok, yeah we have those and it isn't going the trick on improving things
doing*
k
Hey LLMuser995, following up on this ticket if it is resolved for you.