func reportNewIncomingCall()

in AmazonChimeSDKDemo/AmazonChimeSDKDemo/CallKitManager.swift [60:83]


    func reportNewIncomingCall(with call: Call) {
        let handle = CXHandle(type: .generic, value: call.handle)
        let update = CXCallUpdate()
        update.remoteHandle = handle
        update.supportsDTMF = false
        update.supportsHolding = true
        update.supportsGrouping = false
        update.supportsUngrouping = false
        update.hasVideo = false

        provider.reportNewIncomingCall(with: call.uuid, update: update, completion: { error in
            if let error = error {
                self.logger.error(msg: "Error reporting new incoming call: \(error.localizedDescription)")
            } else {
                self.logger.info(msg: "Report new incoming call successfully")
            }
        })

        call.isUnansweredHandler = { [weak self] in
            self?.endCallFromLocal(with: call)
            self?.logger.info(msg: "Incoming call not answered within \(Call.maxIncomingCallAnswerTime) sec")
        }
        call.isUnansweredCallTimerActive = true
    }