mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
end incoming call if it does not exist again
This commit is contained in:
parent
89598d2497
commit
6b8c96348d
1 changed files with 9 additions and 9 deletions
|
|
@ -103,6 +103,15 @@ class ProviderDelegate: NSObject {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 30) {// in 30 second
|
||||
if (CallManager.instance().lc?.callsNb == 0 && !CallManager.instance().providerDelegate.callInfos.isEmpty ) {
|
||||
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: end call which does not exist.")
|
||||
for suuid in CallManager.instance().providerDelegate.uuids.values {
|
||||
CallManager.instance().providerDelegate.endCallForError(uuid: suuid, endedAt: .init(), endedReason: .declinedElsewhere)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func updateCall(uuid: UUID, handle: String, hasVideo: Bool = false) {
|
||||
|
|
@ -157,15 +166,6 @@ extension ProviderDelegate: CXProviderDelegate {
|
|||
CallManager.configAudioSession(audioSession: AVAudioSession.sharedInstance())
|
||||
callInfo?.accepted = true
|
||||
callInfos.updateValue(callInfo!, forKey: uuid)
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 30) {// in 30 second
|
||||
if (CallManager.instance().lc?.callsNb == 0 && !CallManager.instance().providerDelegate.callInfos.isEmpty ) {
|
||||
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: end call which does not exist.")
|
||||
for suuid in CallManager.instance().providerDelegate.uuids.values {
|
||||
CallManager.instance().providerDelegate.endCallForError(uuid: suuid, endedAt: .init(), endedReason: .declinedElsewhere)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CallManager.instance().acceptCall(call: call!, hasVideo: call!.params?.videoEnabled ?? false)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue