我身边也有类似的问题,但我没有使用portsip
. 因此,如果它与 portip 有关,我的答案可能不正确,但是我在 Apple Example上遵循了一些步骤。当我添加configureAudioSession()
方法时,一切对我来说都很好。例如:
func provider(_ provider: CXProvider, perform action: CXStartCallAction) {
// Create & configure an instance of SpeakerboxCall, the app's
configureAudioSession()
self.provider.reportOutgoingCall(with: call.uuid!, connectedAt: Date())
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
// Retrieve the SpeakerboxCall instance corresponding to the action's call UUID
guard callManager.callWithUUID(uuid: action.callUUID) != nil else {
action.fail()
return
}
configureAudioSession()
// Signal to the system that the action has been successfully performed.
action.fulfill()
}
希望能帮助到你。