Commit 8a689af7 authored by DanmeiChen's avatar DanmeiChen
Browse files

hold call before answer another call

parent 3dee6c83
Pipeline #27215 failed with stage
in 12 seconds
......@@ -90,6 +90,7 @@ class ProviderDelegate: NSObject {
let callInfo = callInfos[uuid]
let callId = callInfo?.callId
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: report new incoming call with call-id: [\(String(describing: callId))] and UUID: [\(uuid.description)]")
CallManager.instance().setHeldOtherCalls(exceptCallid: callId ?? "")
provider.reportNewIncomingCall(with: uuid, update: update) { error in
if error == nil {
if CallManager.instance().endCallkit {
......@@ -138,6 +139,10 @@ class ProviderDelegate: NSObject {
func endCallNotExist(uuid: UUID, timeout: DispatchTime) {
DispatchQueue.main.asyncAfter(deadline: timeout) {
let callId = CallManager.instance().providerDelegate.callInfos[uuid]?.callId
if (callId == nil) {
// callkit already ended
return
}
let call = CallManager.instance().callByCallId(callId: callId)
if (call == nil) {
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: terminate call with call-id: \(String(describing: callId)) and UUID: \(uuid) which does not exist.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment