接收事件
call.ended
call.ended 表示通話已結束,包含 data.call.id、reason 和 duration_seconds。在 subscribed_events 中列出 call.ended 即可接收外撥結束事件。
事件載荷
{
"id": "evt_call_example",
"type": "call.ended",
"provider": "whatsapp",
"account_id": "acc_example",
"occurred_at": "2026-10-10T12:00:42Z",
"data": {
"call": {
"id": "call_example",
"direction": "outbound",
"media_type": "voice",
"state": "ended"
},
"reason": "remote_hangup",
"duration_seconds": 42
}
}備註
- call.ended 表示通話已結束,包含 data.call.id、reason 和 duration_seconds。在 subscribed_events 中列出 call.ended 即可接收外撥結束事件。
- 一般工作區須在 subscribed_events 中明確列出 call.answered、call.ended 才能接收相應外撥事件。內測工作區也可使用 *、空陣列或省略訂閱。投遞、重試及死信重播時會重新檢查資格和訂閱。message.* 通話紀錄獨立。
- duration_seconds 是接通秒數並向下取整;0 不一定代表未接通,應同時記錄 call.answered。建立階段同步失敗可能沒有 call.ended。本事件不等同聊天系統訊息。