Function: reportCallEnded()
ts
function reportCallEnded(id, reason): Promise<void>;Defined in: Calls.ts:648
Reports that a call has ended for an external reason.
Use this when a call ends due to reasons outside the local user's control, such as: remote party hung up, network failure, call declined elsewhere, etc.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The call session ID. |
reason | CallEndedReason | The reason the call ended. |
Returns
Promise<void>
Example
typescript
// Remote party hung up
await reportCallEnded(callId, 'remoteEnded');
// Call failed due to network error
await reportCallEnded(callId, 'failed');See
- endCall — the app-initiated path (your user ended the call).
- addReportedCallEndedListener — confirms the OS accepted the report.