Yuvanshu
06/07/2025, 2:46 PMVapi Support Bot
06/07/2025, 2:48 PMendedReason
field in the end-of-call-report
payload. For example, in Node.js:
js
const endedReason = req.body.message.endedReason;
const failedReasons = [
"customer-did-not-answer",
"assistant-error",
"twilio-failed-to-connect-call"
// add more failure reasons as needed
];
if (failedReasons.includes(endedReason)) {
// Retry the call
} else {
// Consider the call successful
}
Tip: Refer to the [Vapi call ended reasons documentation](https://docs.vapi.ai/calls/call-ended-reason) for the full list of possible values and tailor your logic as needed.
Sources:
- [Vapi Server Events Documentation](https://docs.vapi.ai/server-url/events)
- [Vapi Call Ended Reasons](https://docs.vapi.ai/calls/call-ended-reason)Yuvanshu
06/07/2025, 3:28 PMKyle
06/09/2025, 8:24 PM