fix repeat outgoing call connected

This commit is contained in:
Danmei Chen 2020-04-14 20:40:46 +02:00
parent f43ad2d447
commit a9952c479d
2 changed files with 4 additions and 1 deletions

View file

@ -414,9 +414,11 @@ class CoreManagerDelegate: CoreDelegate {
let uuid = CallManager.instance().providerDelegate.uuids["\(callId!)"]
if (uuid != nil) {
let callInfo = CallManager.instance().providerDelegate.callInfos[uuid!]
if (callInfo?.isOutgoing ?? false) {
if (callInfo != nil && callInfo!.isOutgoing && !callInfo!.connected) {
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: outgoing call connected with uuid \(uuid!) and callId \(callId!)")
CallManager.instance().providerDelegate.reportOutgoingCallConnected(uuid: uuid!)
callInfo!.connected = true
CallManager.instance().providerDelegate.callInfos.updateValue(callInfo!, forKey: uuid!)
}
}
}

View file

@ -31,6 +31,7 @@ import os
var isOutgoing = false
var sasEnabled = false
var declined = false
var connected = false
static func newIncomingCallInfo(callId: String) -> CallInfo {