Call Features
Audio Mute/Unmute#
Pass the boolean value true for mute & false for unmute into muteAudio method.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
BOOLEAN | true - Mute the audio false - Unmute the audio | BOOLEAN | true |
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Video Mute/Unmute#
Pass the boolean value true for mute & false for unmute into muteVideo method.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
BOOLEAN | true - Mute the video false - Unmute the video | BOOLEAN | true |
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Invite users#
Invite users by providing the callee’s user JID in array format into the inviteUsers method.
caution
If GroupCall feature is unavailable for your plan, then it will throw 403 exception
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
[USER_JID] | Invite users JID list in array format | Array | true |
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
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.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Cancel the request#
To cancel the call switch request which is aready sent to the remote user, call the cancelVideoCallSwitchRequest method.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Accept the request#
To accept the call switch request, call the acceptVideoCallSwitchRequest method.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Decline the request#
To decline the call switch request, call the declineVideoCallSwitchRequest method.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Get Call Logs Details#
Get the call logs details by calling getCallLogs method.
Request Params#
| Arguments | Description | Type |
|---|---|---|
| pageNumber | Page number | Number |
Response Format#
Response Params#
| Arguments | Description | Type |
|---|---|---|
| data | Object of Array | Object |
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Display Browser Notification#
Display the browser notification by providing the notification object into the showCallNotification method. Notification would display when a user receive a call or end call while user on different screen instead of on webchat application screen.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Call Join Via Link#
Get call link#
When you are in ongoing audio/video call, you can get the call link by using getCallLink method. This method will return call link when you are connected to a call or else it will return error.
Response Format#
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
| data | Call link to share with the others to join the ongoing call | String |
Subscribe call#
Subscribe a call by providing the room link and users display name into the subscribeCall method. A callback method also need to given as an input to handle the success/error of this method. It will hold the success and error object as params.
Once the call subscribed successfully, callback with the success object will be triggered. After this callback success, you can show the Join Now button in the screen.
Same time callUsersUpdateListener will also triggered that will hold the list of users on the call. You can use this event to show the users list in the preview screen. This event callUsersUpdateListener will be triggered whenever there is a change in users list. So you can add/remove users from the preview UI. If callUsersUpdateListener triggered with empty users list, then the call has been ended. You need to close the preview screen and show the message like Call Ended.
If the callback with the error object is triggered, then there is some issue in subscribing the call. You can get the error code and error message from the error object. Based on that you can show alerts or redirect to any other screen in the UI.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
CALL_LINK | Call link | String | true |
USERNAME | Display Name of the current user | String | true |
CALLBACK | Callback method to handle success/error | Function | true |
Success/Error Object#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Join a call#
When you are in the preview screen, to join a call use the joinCall method.
A callback method need to given as an input to handle the success/error of this method. It will hold the success and error object as params. Once the call joined successfully, callback with the success object will be triggered. Then you will receive the normal call events.
If the callback with the error object is triggered, then there is some issue in joining the call. You can get the error code and error message from the error object. Based on that you can show alerts or redirect to any other screen in the UI.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
CALLBACK | Callback method to handle success/error | Function | true |
Success/Error Object#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Unsubscribe a call#
When you are in the preview screen and decided to close the UI without joining the call, you need to clear/unsubscribe the call data by using the unsubscribeCall method.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success Message | String |
Get call users username#
When you are in ongoing audio/video call or in the preview screen for joining the call, you can get the call user's username by using getCallUsername method. This method will return username when you are connected/subscribed to a call or else it will return error.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
USER_ID | User id of the user | String | true |
Response#
Username of the user is shown in the UI.