我正在快速开发VOIP应用程序,并且试图将多个呼叫分组在一起。我是快速编程和使用callKit的新手,所以我真的不知道该怎么做。
该应用程序使用callKit来确定是否已开始电话呼叫,如果是,则该应用程序会呼叫另一个电话号码。
检查电话状态的代码:
@available(iOS 10.0, *)
extension ViewController: CXCallObserverDelegate {
func callObserver(_ callObserver: CXCallObserver, callChanged call: CXCall) {
if call.hasEnded == true {
print("CXCallState: Disconnected")
}
if call.isOutgoing == true && call.hasConnected == false {
print("CXCallState: Dialing")
}
if call.isOutgoing == false && call.hasConnected == false && call.hasEnded == false {
print("CXCallState: Incoming")
}
if call.hasConnected == true && call.hasEnded == false {
print("CXCallState: Connected")
callNumber(phoneNumber: "12345678")
//After the phone number is called i want to group them
}
}
}