Commit 79362149 authored by DanmeiChen's avatar DanmeiChen
Browse files

end call when registration failed

parent ed0fe3bb
Pipeline #31005 passed with stage
in 4 minutes and 42 seconds
......@@ -92,9 +92,10 @@ class ProviderDelegate: NSObject {
provider.reportNewIncomingCall(with: uuid, update: update) { error in
if error == nil {
if CallManager.instance().endCallkit {
CallManager.instance().providerDelegate.endCall(uuid: uuid)
} else {
CallManager.instance().providerDelegate.endCallNotExist(uuid: uuid, timeout: .now() + 20)
let call = CallManager.instance().lc?.getCallByCallid(callId: callId!)
if (call?.state == .PushIncomingReceived) {
try? call?.terminate()
}
}
} else {
Log.directLog(BCTBX_LOG_ERROR, text: "CallKit: cannot complete incoming call with call-id: [\(String(describing: callId))] and UUID: [\(uuid.description)] from [\(handle)] caused by [\(error!.localizedDescription)]")
......
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