Skip to main content
Quick Reference for AI Agents & Developers
  • Build request: CometChatCallsSDK.CallLogsRequest.CallLogsBuilder().set(limit:).build()
  • Fetch logs: callLogsRequest.fetchNext(onSuccess:onError:)
  • Filters: .set(callType:), .set(callStatus:), .set(hasRecording:), .set(callDirection:)
  • Call details: CometChat.getCallDetails(sessionID:onSuccess:onError:)
  • Related: Ringing · Call Session · Calling Overview

Overview

CometChat’s iOS Call SDK provides a comprehensive way to integrate call logs into your application, enhancing your user experience by allowing users to effortlessly keep track of their communication history. Call logs provide crucial information such as call duration, participants, and more. This feature not only allows users to review their past interactions but it also serves as an effective tool to revisit important conversation details. With the flexibility of fetching call logs, filtering them according to specific parameters, and obtaining detailed information of individual calls, application developers can use this feature to build a more robust and interactive communication framework. In the following sections, we will guide you through the process of working with call logs, offering a deeper insight into how to optimally use this feature in your iOS application.

Fetching Call Logs

To fetch all call logs in your iOS application, you should use the CallLogRequestBuilder, This builder allows you to customize the call logs fetching process according to your needs.
Builder Configuration:Built CallLogsRequest Object:
CallLogRequestBuilder has the following settings available.
CallLogsBuilder Methods:CallType Enum Values:CallStatus Enum Values:CallCategory Enum Values:CallDirection Enum Values:

Fetch Next

The**fetchNext()**method retrieves the next set of call logs.
HTTP Request:Query Parameters:Request Headers:
Success Callback Parameter:CallLog Object:Initiator Object:Receiver Object (User):Receiver Object (Group):Recording Object:Error Callback Parameter:

Fetch Previous

The**fetchPrevious()**method retrieves the previous set of call logs.
HTTP Request:Query Parameters:Request Headers:
Success Callback Parameter:Note: Returns empty array [] if no previous logs exist.Error Callback Parameter:

Get Call Details

To retrieve the specific details of a call, use the**getCallDetails()**method. This method requires the Auth token of the logged-in user and the session ID along with a success and error callback. Upon success, this function will return a list of call details, as multiple calls can be initiated for one session ID.
Method Parameters:HTTP Request:Request Headers:
Success Callback Parameter:CallLog Object (Detailed):Initiator Object:Receiver Object:Recording Object:Participant Object:Error Callback Parameter:
Note: Replace**"SESSION_ID"**with the ID of the session you are interested in.

Filter Examples

The following examples demonstrate how to use various filters with the CallLogsBuilder.

Filter by Call Type

Audio Calls Request:Query Parameters (Audio):Video Calls Request:Query Parameters (Video):Request Headers:

Filter by Call Direction

Incoming Calls Request:Query Parameters (Incoming):Outgoing Calls Request:Query Parameters (Outgoing):Request Headers:

Filter by Recording Status

With Recording Request:Query Parameters (With Recording):Without Recording Request:Query Parameters (Without Recording):Note: When hasRecording is false, the parameter is omitted from the request.Request Headers:

Filter by User

HTTP Request:Query Parameters:Request Headers:Response:

Filter by Group

HTTP Request:Query Parameters:Request Headers:Response:

Filter by Call Category (Meetings)

HTTP Request:Query Parameters:Request Headers:Response:Meeting-Specific CallLog Properties: