Handling call events
#
Listening to the call eventsIn order to listen to the call events you need to set delegate to the CallManagerDelegate sdk using the below method
info
AudioLevel ranges from 0 to 10, 0 being very low sound and 10 being too loud.
#
Handling mute eventsWhenever call end user mute/unmute video or audio, the below delegate will be triggered.
muteEvent
value will be anyone of the values of annotation class MuteEvent
.
muteEvent Value | Call event |
---|---|
MuteEvent.ACTION_REMOTE_VIDEO_MUTE | when the remote user muted his video |
MuteEvent.ACTION_REMOTE_VIDEO_UN_MUTE | when the remote user unmuted his video |
MuteEvent.ACTION_REMOTE_AUDIO_MUTE | when the remote user muted his audio |
MuteEvent.ACTION_REMOTE_AUDIO_UN_MUTE | when the remote user unmuted his video |
MuteEvent.ACTION_LOCAL_AUDIO_MUTE | when the local user muted his audio |
MuteEvent.ACTION_LOCAL_AUDIO_UN_MUTE | when the local user unmuted his video |
#
Handling call status eventsWhenever call status changed in video or audio call, the below delegate will be triggered.
callStatus
value will be anyone of the values of annotation class CallStatus
.
callStatus Value | Call event |
---|---|
CallStatus.CALLING | the initial state of the call |
CallStatus.CONNECTING | The current call is in connecting state |
CallStatus.RINGING | the remote user is having internet and acknowledged the call |
CallStatus.ATTENDED | the user attended call and UI can be presented with the users in the call |
CallStatus.CONNECTED | the call is successfully connected and audio/video tracks transmission is about to start |
CallStatus.DISCONNECTED | the call is disconnected and call UI can be closed |
CallStatus.RECONNECTING | the call is in reconnecting state |
CallStatus.RECONNECTED | the call is connected back after a reconnecting state |
CallStatus.ON_HOLD | the remote user has put your call on hold, it will happedn when the remote user attended gsm call |
CallStatus.ON_RESUME | the remote user has resumed your call after a on hold, it will happen when the remote user disconnected gsm call |
CallStatus.CALL_TIME_OUT | when we don't receive ack for the outgoing call from the remote user within 30 seconds, When we don't receive ack for the incoming call from the caller within 30 seconds, When we don't receive ack for the call invite from the invited user within 30 seconds |
CallStatus.INVITE_CALL_TIME_OUT | when we don't receive ack for the invited outgoing call from the remote user within 30 seconds, When we don't receive ack for the incoming call from the caller within 30 seconds, When we don't receive ack for the call invite from the invited user within 30 seconds |
CallStatus.USER_JOINED | the call is connected and user joined the call |
CallStatus.USER_LEFT | when user left the call |
#
Handling call action eventsWhenever call action received in video or audio call, the below delegate will be triggered,
callAction
value will be anyone of the values of annotation class CallAction
.
callAction Value | Call event |
---|---|
CallAction.ACTION_LOCAL_HANGUP | whenever you disconnect the call, the action will be received |
CallAction.ACTION_DENY_CALL | when you decline the incoming call, the action will be received for callee |
CallAction.ACTION_PERMISSION_DENIED | when you attend the incoming call without required permissions, the action will be received for the callee |
CallAction.ACTION_REMOTE_ENGAGED | when the remote user is engaged in the another call, the action will be received for the caller |
CallAction.ACTION_REMOTE_BUSY | when the remote user declines incoming the call, the action will be received for the caller |
CallAction.ACTION_AUDIO_DEVICE_CHANGED | whenever the audio device changed in call, update the audio device UI |
CallAction.ACTION_INVITE_USERS | When you invite users to the call, this will be triggered so that you can update your UI |
CallAction.ACTION_VIDEO_CALL_CONVERSION_REJECTED | When remote user declined our video call switch request |
CallAction.ACTION_VIDEO_CALL_CONVERSION_ACCEPTED | When remote user accepted our video call switch request |
CallAction.ACTION_VIDEO_CALL_CANCEL_CONVERSION | When remote user cancels the video call switch request made by them |
CallAction.ACTION_CAMERA_SWITCH_DONE | When camera switch done, the action will be received |
CallAction.CHANGE_TO_AUDIO_CALL | When ui needs to be changed as audio call ui this action will be received |
CallAction.ACTION_REMOTE_VIDEO_ADDED | When the remote user video track is received, this action will be received |
CallAction.INCOMING_ACTION_PERMISSION_DENIED | When Audio or Camera permission is denied and receives a call |
CallAction.ACTION_SHOW_CALL_UI | when need to show call UI, the action will be received |
CallAction.ACTION_ANSWER_CALL | whenever callee answer call, the action will be received |
CallAction.ACTION_REMOTE_HANGUP | whenever callee disconnect the call, the action will be received |
CallAction.ACTION_REMOTE_CHANGE_STATUS | whenever callee the call status changed, the action will be received |
CallAction.ACTION_REMOTE_OTHER_BUSY | whenever callee in other than mirrorfly call, the action will be received |
CallAction.ACTION_CALL_AGAIN | whenever callee is ready to call again, the action will be received |
CallAction.ACTION_CANCEL_CALL_AGAIN | whenever you cancel call again, the action will be received |
CallAction.ACTION_SWITCH_CAMERA | whenever you called switch camera, the action will be received |
CallAction.ACTION_REMOTE_VIDEO_STATUS | callee updated video status, the action will be received |
CallAction.ACTION_VIDEO_CALL_CONVERSION | whenever call got conversion, the action will be received |
CallAction.CALL_REQUEST_RESPONSE | call request response, the action will be received |
#
Handling the video track eventsWhen the remote user video track is received, this action will be received: CallAction.ACTION_REMOTE_VIDEO_ADDED. When this action is triggered, request SDK to fetch the track of the user
#
Observing the Missed call Notification on ForegroundIn order to Observe the missed call notification in foreground you need to set the delegate MissedCallNotificationDelegate in AppDelegate using the below method