diff --git a/Classes/ProviderDelegate.swift b/Classes/ProviderDelegate.swift index 482df084b..1b7fdd467 100644 --- a/Classes/ProviderDelegate.swift +++ b/Classes/ProviderDelegate.swift @@ -174,19 +174,15 @@ extension ProviderDelegate: CXProviderDelegate { Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: answer call with call-id: \(String(describing: callId)) and UUID: \(uuid.description).") let call = CallManager.instance().callByCallId(callId: callId) - - // workaround - CallManager.configAudioSession(audioSession: AVAudioSession.sharedInstance()) if (call == nil || call?.state != Call.State.IncomingReceived) { // The application is not yet registered or the call is not yet received, mark the call as accepted. The audio session must be configured here. - + CallManager.configAudioSession(audioSession: AVAudioSession.sharedInstance()) callInfo?.accepted = true callInfos.updateValue(callInfo!, forKey: uuid) CallManager.instance().providerDelegate.endCallNotExist(uuid: uuid, timeout: .now() + 10) } else { CallManager.instance().acceptCall(call: call!, hasVideo: call!.params?.videoEnabled ?? false) } - Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: answer call finished.") action.fulfill() }