Call Features

Audio Mute/Unmute#

Pass the boolean value true for mute & false for unmute into muteAudio method.

await SDK.muteAudio(BOOLEAN);

Request Params#

ParamDescriptionTypeRequired
BOOLEANtrue - Mute the audio
false - Unmute the audio
BOOLEANtrue

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Video Mute/Unmute#

Pass the boolean value true for mute & false for unmute into muteVideo method.

await SDK.muteVideo(BOOLEAN);

Request Params#

ParamDescriptionTypeRequired
BOOLEANtrue - Mute the video
false - Unmute the video
BOOLEANtrue

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Video Call Switch#

To initiate the video call switch process, a callSwitchListener callback should already be registered in the client app to receive the request, accept, decline & cancel status information. Because whenever user perform any action related to this call switch, Client app will receive the user action status in this callback.

Request the Call Switch#

To send the call switch request, call the requestVideoCallSwitch method.

await SDK.requestVideoCallSwitch();

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Cancel the request#

To cancel the call switch request which is already sent to the remote user, call the cancelVideoCallSwitchRequest method.

await SDK.cancelVideoCallSwitchRequest();

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Accept the request#

To accept the call switch request, call the acceptVideoCallSwitchRequest method.

await SDK.acceptVideoCallSwitchRequest();

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Decline the request#

To decline the call switch request, call the declineVideoCallSwitchRequest method.

await SDK.declineVideoCallSwitchRequest();

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Call Logs#

SDK keeps a local db for storing call logs which includes all types of call logs with required information for the each and every call log.

Get Call Logs Details#

You can able to retrieve the calllogs by using the below SDK method.

await SDK.getCallLogs('PAGE_NUMBER');

Request Params#

ArgumentsDescriptionType
pageNumberPage numberNumber

Response Format#

{
statusCode: `STATUS_CODE`,
message: `ERROR|SUCCESS message`,
data: {
callLogs: [ // array of object
{
callMode: "onetoone|onetomany",
callState: 1
callTime: 1687942398316000,
callType: "audio|video",
callerDevice: "ANDROID | IOS",
endTime: 1687942643614000,
fromUser: "FROM_USER_JID",
groupId: ""|GROUP_ID,
inviteUserList: "",
roomId: "937a8b33-fe33-4d93-b0e4-00716aed3cbb",
sessionStatus: "closed",
startTime: 1687942407172000,
toUser: "TO_USER_JID",
userList: "USER_JID"
}
],
totalPages: 'NUMBER'
},
}

Response Params#

ArgumentsDescriptionType
dataObject of ArrayObject
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Delete call logs#

To delete a single or multiple calllogs by using the below SDK method.

await SDK.deleteCallLog(['callLogIds',...]);

Response Format#

{
statusCode: 200, // Number - status code
message: "", // String - Success/Error Message
}

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString
note

userCallLogListener check here for more information.

Clear call logs#

To clear all the calllogs by using the below SDK method.

await SDK.clearAllCallLog();

Response Format#

{
statusCode: 200, // Number - status code
message: "", // String - Success/Error Message
}

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString

Sync all call logs#

This method will fetch the CallLogs from localDB and update to the server.

await SDK.uploadUnSyncedCallLogs();

Response Format#

{
statusCode: 200, // Number - status code
message: "", // String - Success/Error Message
}

Response Params#

ArgumentsDescriptionType
statusCodeStatus CodeNumber
messageSuccess/Error MessageString