Call Event Reference

Listen for call lifecycle events. All platforms receive the same event types.

Event typeDirectionDescription
CALL_INVITECalleeIncoming call. callId + targetUserId available
CALL_RINGINGCallerCallee device received the invite
CALL_ACCEPTEDCallerCallee accepted, WebRTC setup begins
CALL_REJECTEDCallerCallee declined
CALL_CANCELLEDCalleeCaller cancelled before answer
CALL_ENDEDBothEither side hung up. Clean up streams.
CALL_VIDEO_TOGGLEBothPeer changed camera state. payload = "true"/"false"
CALL_DENIED_LIMIT_REACHEDCallerMonthly minute quota exhausted
client.onCallEvent((event) => {
  switch (event.type) {
    case 'CALL_INVITE':              showIncomingCallUI(event.callId); break;
    case 'CALL_ENDED':               clearCallUI(); break;
    case 'CALL_DENIED_LIMIT_REACHED': showUpgradePrompt(); break;
    case 'CALL_VIDEO_TOGGLE':         updatePeerVideo(event.payload === 'true'); break;
  }
});