In iOS, Mute/UnMute function needs to call programatically from CallKit

I have implemented the Jitsi SDK in iOS and it is working fine. I am getting only one major issue that is, When I mute the call from Call Kit, I am not able to mute the Jitsi call, In Jitsi SDK, there is no public function which we can call.

Can you please let me know any alternate way which I can use and mute the Jitsi call from call kit screen.

Hi @tarun987,

We’re also trying to integrate Jitsi SDK with CallKit however we’re having some problems when accepting incoming calls when the device is locked.

Neither the Mute / UnMute or Speaker buttons are working, and we believe it’s because the UUID used to interact with CallKit when calling JMCallKitProxy.reportNewIncomingCall is different than the UUID created by Jitsi when calling JitsiMeetView.join method when performAnswerCall(UUID:) is called on
JMCallKitListener.

Somehow it seems that all these issues would be fixed if JitsiMeetView.join could use the same UUID passed to JMCallKitProxy.reportNewIncomingCall however there is not a clear way to do that.

Looking at the JavaScript https://github.com/jitsi/jitsi-meet/blob/8fa41bebb7bc5d2df7a4a95f0d677dc4b4a2cd38/react/features/mobile/call-integration/middleware.js#L268 it seems that Jitsi has a check if there is a callUUID and returns instead of starting a new call, however it’s not clear how we can set that existing callUUID.

Any help with this would be appreciated.

Thank you,
Cosmin

I m also facing the same issue, i tried by commenting the udid check in middleware.js and its working. That means the issue is with udid only. @cosminstirbu

Hmm, so you’re saying you have commented out

if (conference.callUUID) {
    return result;
}

and now both Mute / Unmute and Speaker buttons are working?

I haven’t tried yet but I have noticed in the logs this line [RNCallKit][startCall] callUUID=... right after callling JitsiMeetView.join which indicates that JitsiMeetView.join creates its own call.

function _onPerformSetMutedCallAction({ callUUID, muted }) {
const { dispatch, getState } = this; // eslint-disable-line no-invalid-this
const conference = getCurrentConference(getState);

// if (conference && conference.callUUID === callUUID) {

    muted = Boolean(muted); // eslint-disable-line no-param-reassign
    sendAnalytics(
        createTrackMutedEvent('audio', 'call-integration', muted));
    dispatch(setAudioMuted(muted, /* ensureTrack */ true));

// }
}

Please do let me know if your find any better solution