1

我在我的 VOIP 呼叫应用程序中使用 portsip SDK(试用版)。呼叫在前台和后台也能正常工作。我在客户端使用 Call Kit 框架进行传入/传出呼叫,当我从后台删除应用程序或强制应用程序时,在这种情况下,当我尝试与其他设备通话时,我收到了 VOIP 推送但端口 sip 传入委托不调用,而如果我再次调用(在同一应用程序状态下第二次)端口 sip 传入委托调用。所以在来电代表不打电话之前,我们不能接受。拒绝来电。**

所以请帮我看看如果应用程序被终止或强制执行,我们如何调用端口 sip 委托。

4

1 回答 1

0

我身边也有类似的问题,但我没有使用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()
}

希望能帮助到你。

于 2017-02-09T07:05:55.140 回答