Reputation: 8053
I am using portsip SDK (trial version) in my application for VOIP call. Call is working fine in foreground and background as well. I m using Call Kit framework for incoming/outgoing call at client side, When i removed application from background or force quite the app, in that case when i try to call with other device call is coming, i received VOIP push but port sip incoming delegate does not invoke whereas if i call again (2nd time in same app state) port sip incoming delegate invoke. so until incoming delegate does not call we can not accept.decline incoming call.**
So please help me out how we can invoke the port sip delegate if app is terminated or force quite.
Upvotes: 1
Views: 537
Reputation: 2407
I had a similar problem on my side but I am not using portsip
. So If it is related with portsip my answer may not be correct however I followed some steps on the Apple Example. When I added configureAudioSession()
method everything worked fine for me. For example:
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()
}
Hope it helps.
Upvotes: 0