state. completed means the call ran and ended normally. failed means there was no conversation, and failureReason says why. endedBy, when present, says who hung up. Everything else on the record is detail.
The fields, and where each comes from
Three things to know before you build on these:
- Switch on
failureReason, showfailureReasonWithCode.outcomeis coarser.wrong_number,declined,network_errorandcall_failedall readfailedthere. - Read the record once
stateis terminal.call.completedis the cue. Before that, neitheroutcomenorendedByis a verdict. - A silent pickup ends
failed, notcompleted. The carrier answered, soconnectedAtis set. Nobody spoke, soansweredAtis absent andconnectedisfalse.
Why it failed
The code after the colon in
failureReasonWithCode is the carrier’s SIP response. Reasons without one carry no code.
For campaign dialing, the default retry policy redials when outcome is no_answer, busy, voicemail, silent_pickup, failed or unreachable, up to three attempts. Here an unreachable phone is often only briefly off or out of coverage, so it earns a retry.
Who hung up
endedBy has three values you will see:
agent. The model calledend_call, or the agent closed the call itself: an unanswered silence check, or a voicemail verdict.callee. The customer hung up first.system. We forced the close. Credits ran out mid-call, or the agent hit an error on our side.
supervisor is reserved. An outbound call that completed with answeredAt and no stamp reads callee. That covers calls from before we stamped it, and calls where the worker died before it could. On inbound and web sessions a caller hangup leaves endedBy absent. Only the agent and system stamps apply there.
The timestamps
createdAt, ringingAt, connectedAt, answeredAt and endedAt are the life of the call, and how it works draws them in order. dialingAt exists too, but our carrier rarely reports it. The full list, with what each one means while the call is live, is on phone call states.