mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix workaround for incoming call
This commit is contained in:
parent
daf5fba2d0
commit
244d580bf8
1 changed files with 5 additions and 1 deletions
|
|
@ -174,15 +174,19 @@ 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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue