End call being triggered unexpectedly
# support
k
This is from my Arabic assistant. After the first msg from the assistant, it misinterpreted نعم with لا And the end call tool got triggered right away. I don't want this. unless the user explicitly says they are busy. and I want the assistant to confirm before triggering the end call. https://cdn.discordapp.com/attachments/1438860457334018189/1438860457619488879/Screenshot_2025-11-13_at_9.49.13_PM.png?ex=69429ab9&is=69414939&hm=b12e742d22de4a0b629324cf7cb6628dae0b031af3706c5e13596b805c1788d9&
v
To prevent premature call endings, add a confirmation step before triggering the end call. For example, update your assistant's logic to ask:
Copy code
text
"Just to confirm, would you like to end the call now? Please say 'yes' to end or 'no' to continue."
This ensures the assistant only ends the call if the user explicitly confirms, reducing the risk of misinterpretation. You can review and adjust this logic in your workflow or tool configuration as suggested in the [debugging guide](https://docs.vapi.ai/debugging). Source: - [Debugging voice agents](https://docs.vapi.ai/debugging)
c
Hi KM, If you'd like to end a call programmatically using the
ClientInboundMessage
, you can do so by sending a message with the
type
property set to
"end-call"
. This enables you to terminate the call efficiently within your application. You can find more details in the [changelog for January 14, 2025](https://docs.vapi.ai/changelog/2025/1/14). For understanding the various reasons a call can end, you can refer to the list of
endedReason
codes available under the [Call Ended Reasons guide](https://docs.vapi.ai/calls/call-ended-reason). These reasons are useful for analyzing call logs and troubleshooting call terminations. Feel free to let me know if you need more information.
k
So, in my call this is the most information i am seeing in call logs, I don't understand what was the reason for the tool being triggered, Is there a way to find out? because in this particular call, after the end call tool was triggered. the custom hang up the call. and that is the reason i see listed in call logs. "name": "endCall", "role": "tool_call_result", "time": 1763052325570, "result": "Success.", "toolCallId": "call_0jrPJAWn3kECpfFVMLwgBPdj", "secondsFromStart": 37.074 } Also i see the list of endcall reasons, but is there a guide on how to set up that? Like i wish to prevent the end call from getting triggered prematurely.
c
If you would like us to review the call logs for the reason why the endCall tool was called, please provide a call id
k
sure this is the call id 019a7e1a-d1c2-7dd9-9fe9-b416b9c9b230
c
For your prompt, modify it so that the assistant can handle this scenario explicitly. Attached is a new system prompt file you can use. https://cdn.discordapp.com/attachments/1438860457334018189/1458224714785755479/improved_assistant_prompt.md?ex=6966c618&is=69657498&hm=5552dd4dc551ce4d6ea96985084f545997a625c89c884a6871df304f9a6feb15&
3 Views