Skip to content

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

ParameterTypeDescription
idstringThe call session ID.
reasonCallEndedReasonThe 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

Released under the MIT License.