Ringing functionality requires the CometChat Chat SDK for Flutter to be integrated alongside the Calls SDK. The Chat SDK handles call signaling (initiating, accepting, rejecting calls), while the Calls SDK manages the actual call session.
How Ringing Works
The ringing flow involves two SDKs working together:- Chat SDK - Handles call signaling (initiate, accept, reject, cancel)
- Calls SDK - Manages the actual call session once accepted
Initiate a Call
Use the Chat SDK to initiate a call to a user or group:Listen for Incoming Calls
Register a call listener to receive incoming call notifications:Accept a Call
When an incoming call is received, accept it using the Chat SDK:Reject a Call
Reject an incoming call:Cancel a Call
Cancel an outgoing call before it’s answered:Join the Call Session
After accepting a call (or when your outgoing call is accepted), join the call session using the Calls SDK:In Flutter,
joinSession returns a Widget? through the onSuccess callback. You must place this widget in your Flutter widget tree to render the call UI. See Join Session for more details.End a Call
Properly ending a call requires coordination between both SDKs to ensure all participants are notified and call logs are recorded correctly. When using the default call UI, listen for the end call button click usingButtonClickListener and call endCall():
onCallEndedMessageReceived callback and should leave the session: