LLMUser995
02/27/2025, 10:30 PMVapi Support Bot
02/27/2025, 10:31 PMendCall
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:
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:
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:
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"
}
]
}
}
### CaveatsVapi Support Bot
02/27/2025, 10:31 PMLLMUser995
02/27/2025, 10:37 PMKyle
03/02/2025, 2:01 AMLLMUser995
03/02/2025, 10:54 PMKyle
03/07/2025, 10:39 PMKyle
03/07/2025, 10:41 PM[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:
[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:
endCallPhrases: [
"goodbye",
"bye",
"end the call",
"hang up",
"that will be all",
"I'm done"
]
LLMUser995
03/12/2025, 2:34 PMKyle
03/14/2025, 1:27 AMLLMUser995
03/14/2025, 8:37 PMKyle
03/16/2025, 6:03 PMLLMUser995
03/19/2025, 3:04 PMLLMUser995
03/19/2025, 4:16 PMKyle
03/20/2025, 2:35 AM