- 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 theCallLogRequestBuilder, This builder allows you to customize the call logs fetching process according to your needs.
Sample Payload - CallLogsRequest.CallLogsBuilder()
Sample Payload - CallLogsRequest.CallLogsBuilder()
CallLogRequestBuilder has the following settings available.
Sample Payload - Builder Methods Reference
Sample Payload - Builder Methods Reference
Fetch Next
The**fetchNext()**method retrieves the next set of call logs.
Sample Payload - fetchNext() Request
Sample Payload - fetchNext() Request
Sample Payload - fetchNext() Response
Sample Payload - fetchNext() Response
Fetch Previous
The**fetchPrevious()**method retrieves the previous set of call logs.
Sample Payload - fetchPrevious() Request
Sample Payload - fetchPrevious() Request
Sample Payload - fetchPrevious() Response
Sample Payload - fetchPrevious() Response
[] 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.
Sample Payload - getCallDetail() Request
Sample Payload - getCallDetail() Request
Sample Payload - getCallDetail() Response
Sample Payload - getCallDetail() Response
"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
- Video Calls
Sample Payload - Filter by Call Type
Sample Payload - Filter by Call Type
Filter by Call Direction
- Incoming Calls
- Outgoing Calls
Sample Payload - Filter by Call Direction
Sample Payload - Filter by Call Direction
Filter by Recording Status
- With Recording
- Without Recording
Sample Payload - Filter by Recording Status
Sample Payload - Filter by Recording Status
hasRecording is false, the parameter is omitted from the request.Request Headers:Filter by User
Sample Payload - Filter by User
Sample Payload - Filter by User
Filter by Group
Sample Payload - Filter by Group
Sample Payload - Filter by Group
Filter by Call Category (Meetings)
Sample Payload - Filter by Call Category (Meetings)
Sample Payload - Filter by Call Category (Meetings)