mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix an issue where Callkit was accidentally requesting termination of a call while resuming another one.
This commit is contained in:
parent
5fe2af9d50
commit
aefe5e1ad0
1 changed files with 7 additions and 1 deletions
|
|
@ -224,7 +224,11 @@ extension ProviderDelegate: CXProviderDelegate {
|
|||
if (action.isOnHold) {
|
||||
CallManager.instance().speakerBeforePause = CallManager.instance().isSpeakerEnabled()
|
||||
try call!.pause()
|
||||
CallManager.instance().actionToFulFill = action;
|
||||
// fullfill() the action now to indicate to Callkit that this call is no longer active, even if the
|
||||
// SIP transaction is not completed yet. At this stage, the media streams are off.
|
||||
// If callkit is not aware that the pause action is completed, it will terminate this call if we
|
||||
// attempt to resume another one.
|
||||
action.fulfill()
|
||||
} else {
|
||||
if (CallManager.instance().lc?.conference != nil && CallManager.instance().lc?.callsNb ?? 0 > 1) {
|
||||
try CallManager.instance().lc?.enterConference()
|
||||
|
|
@ -232,6 +236,8 @@ extension ProviderDelegate: CXProviderDelegate {
|
|||
NotificationCenter.default.post(name: Notification.Name("LinphoneCallUpdate"), object: self)
|
||||
} else {
|
||||
try call!.resume()
|
||||
// We'll notify callkit that the action is fulfilled when receiving the 200Ok, which is the point
|
||||
// where we actually start the media streams.
|
||||
CallManager.instance().actionToFulFill = action;
|
||||
// HORRIBLE HACK HERE - PLEASE APPLE FIX THIS !!
|
||||
// When resuming a SIP call after a native call has ended remotely, didActivate: audioSession
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue