I was struggling with this issue as well, but I found a fix! Hopefully it works for you too.
I fixed it by moving the logic from the Node to the Global Prompt. In Flex Mode, a 'race condition' often causes the tool to terminate the call before the TTS finishes I believe.
Instead of using 'Speak during execution' in the node, I left the node empty and added a strict 'Output-First' protocol to the Global Prompt:
- Instruction: Explicitly tell the agent to output the farewell sentence (e.g., 'Have a great day') first.
- Sequential Action: Instruct the agent to trigger the end_call tool immediately after generating that specific sentence.
- No Wait: Command the agent to never wait for user input between the speech and the tool call.
I believe this forces the LLM to sequence the speech and the hangup technical action correctly every time. Good luck!