Skip to main content
Implement incoming and outgoing call notifications using the CometChat Chat SDK’s calling features. The Calls SDK handles the actual call session, while the Chat SDK manages call signaling.
Ringing functionality requires the CometChat Chat SDK (@cometchat/chat-sdk-react-native) for call signaling. The Calls SDK is used for the actual call session.

Prerequisites

  1. CometChat Chat SDK integrated
  2. CometChat Calls SDK integrated
  3. Push notifications configured (for background calls)

Initiate a Call

Use the Chat SDK to initiate a call:
By default, an unanswered call automatically cancels after 45 seconds. You can customize this duration by passing an optional timeout parameter (in seconds) as the second argument to initiateCall().
ParameterTypeDescription
callCallThe call object created with receiver ID, call type, and receiver type.
timeoutnumberOptional. The ringing duration in seconds before an unanswered call is automatically cancelled. Default: 45.

Listen for Incoming Calls

Register a call listener to receive incoming calls:

Accept a Call

Accept an incoming call:

Reject a Call

Reject an incoming call:

End a Call

End an ongoing call:

Start Call Session After Accept

After accepting a call, start the Calls SDK session:

Complete Example