https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> Is there an example on how ...
# ❓・ai-evy-support
p
@AI Evy Is there an example on how to avoid abrupt endings where the AI calls end_Call tool rightaway without properly concluding the call with the user on good terms?
a
Thanks for tagging me @presidentjoebiden2762. I'll look through relevant sources and get back to you shortly.
### Answer Yes, there are a few recommended approaches to ensure proper call conclusion: 1. For custom LLM implementations, you can define the end_call function with a required message parameter that must be spoken before ending the call [(1) ]() . Here's how to structure it:
Copy code
typescript
{
  name: "end_call",
  description: "End the call only when user explicitly requests it.",
  parameters: {
    type: "object",
    properties: {
      message: {
        type: "string",
        description: "The message you will say before ending the call with the customer.",
      },
    },
    required: ["message"],
  },
}
2. When using conversation nodes, you can place a conversation node before the end node to deliver farewell messages [(2) ]() . The end node itself doesn't speak, so this ensures your farewell message is delivered . 3. Structure your prompts clearly with numbered steps: - When the conversation ends or user says "bye": 1. Say farewell message 2. Use end_call tool to end the call [(3) ]() 4. For additional safety, you can set max call duration and max silence duration parameters to ensure calls eventually end even if the end_call function isn't triggered . These approaches help ensure your agent maintains proper conversation etiquette while effectively managing call termination.
​ To learn more, see the sources I considered: [[1] Integrate Function Calling](https://docs.retellai.com/integrate-llm/integrate-function-calling) [[2] End Node](https://docs.retellai.com/build/conversation-flow/end-node) [[3] Discord message from @sanava.ai on 2025-03-14](https://discord.com/channels/1186424376300679209/1294891368505937952/1350212730593873941) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.