Skip to main content
Quick Reference for AI Agents & Developers
  • Two teardowns: CometChat.removeCallListener(id) and the Calls-SDK listener + leaveSession()
  • Unanswered calls cancel after 45s by default — initiateCall(call, timeoutInSeconds) to change it
  • ⚠️ This rings the callee only while their app is open — waking a closed app needs VoIP Calling
  • Testing ringing needs two live clients on separate devices
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().

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