Skip to main content
Emitted when a call fails to connect or is rejected.

Category

Call

Callback Parameters

ParameterTypeDescription
sessionCallSessionThe failed call session
endInfoCallEndInfoInformation about why the call failed

Example

client.on('failed', (session, endInfo) => {
  console.error('Call failed. Cause:', endInfo.cause);
  console.error('Originator:', endInfo.originator);
  console.error('Description:', endInfo.description);
});

More Information

  • ended โ€” fires when the call ends normally
  • error โ€” fires for general SDK errors
  • CallEndInfo โ€” end info type definition