Post

Replies

Boosts

Views

Activity

Reply to provider(_:didActivate:) callback intermittently not triggered, causing widespread audio loss for users
Hi [DTS Engineer's], Thank you for your previous recommendations. We have successfully implemented them, but unfortunately, the core issue persists with a critical symptom. We performed a comparative analysis with other communication apps like WhatsApp, Zalo, and Telegram under the same scenario. On those platforms, the audio failure only occurs temporarily for a single call; subsequent incoming or outgoing calls recover and function normally. However, with our app, once the audio is lost, it remains completely silent for all subsequent calls. The only way to restore audio functionality is to force-kill and restart the app. This behavior is causing a severe degradation of our user experience and is considered a critical blocker for our production app. Do you have any further recommendations or insights into what might be causing our audio session (or audio graph) to latch into this unrecoverable state? Thank you for your continued support.
Topic: App & System Services SubTopic: General Tags:
Jul ’26
Reply to Can reproduce in SpeakerBox that CallKit doesn't activate audiosession when call finished by remote caller
Our solution hooks into the didDeactivate delegate method. When an external cellular call ends and deactivates our audio session, we introduce a 0.5-second delay to avoid system race conditions. We then check if our VoIP call is stuck on hold (isOnHold == true) via CXCallObserver. If it is, we programmatically trigger a CXSetHeldCallAction(onHold: false) transaction to force recovery and reclaim the audio pipeline." Clean Code Architecture Swift public func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) { log("🚨 Audio session deactivated by OS.") // 0.5s Delay to allow CoreAudio to clear the cellular teardown DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in self?.resumeVoIPCallIfNeeded() } } func resumeVoIPCallIfNeeded() { guard let uuid = CallStateManager.shared.getNewestBy(state: .active)?.uuid else { return } let isOnHold = CallKitManager.shared.callObserver.calls.first { $0.uuid == uuid }?.isOnHold ?? false log("📊 Current VoIP isOnHold status: \(isOnHold)") guard isOnHold else { return } log("🔄 Unholding VoIP call programmatically.") // Apple Workaround: Refresh config right before unholding to fix SessionID 0x0 if let provider = CallKitManager.shared.provider { provider.configuration = provider.configuration } let action = CXSetHeldCallAction(call: uuid, onHold: false) let transaction = CXTransaction(action: action) CXCallController().request(transaction) { [weak self] error in if let error = error { self?.log("❌ Unhold failed: \(error.localizedDescription)") } else { self?.log("✅ Call successfully resumed.") } } } public func provider(_ provider: CXProvider, perform action: CXSetHeldCallAction) { log("provider performSetHeldCallAction") if (action.isOnHold) { action.fulfill() } else { configureAudioSessionEarly() action.fulfill() } }
Topic: App & System Services SubTopic: General Tags:
Jun ’26
Reply to provider(_:didActivate:) callback intermittently not triggered, causing widespread audio loss for users
When the audio stopped working, the entire call audio system malfunctioned. Apps like WhatsApp and Phone were affected, but Zalo was still able to make calls. The device must be restarted before it can be used again.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’26
Reply to provider(_:didActivate:) callback intermittently not triggered, causing widespread audio loss for users
Hi [DTS Engineer's], Thank you for your previous recommendations. We have successfully implemented them, but unfortunately, the core issue persists with a critical symptom. We performed a comparative analysis with other communication apps like WhatsApp, Zalo, and Telegram under the same scenario. On those platforms, the audio failure only occurs temporarily for a single call; subsequent incoming or outgoing calls recover and function normally. However, with our app, once the audio is lost, it remains completely silent for all subsequent calls. The only way to restore audio functionality is to force-kill and restart the app. This behavior is causing a severe degradation of our user experience and is considered a critical blocker for our production app. Do you have any further recommendations or insights into what might be causing our audio session (or audio graph) to latch into this unrecoverable state? Thank you for your continued support.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’26
Reply to Can reproduce in SpeakerBox that CallKit doesn't activate audiosession when call finished by remote caller
Our solution hooks into the didDeactivate delegate method. When an external cellular call ends and deactivates our audio session, we introduce a 0.5-second delay to avoid system race conditions. We then check if our VoIP call is stuck on hold (isOnHold == true) via CXCallObserver. If it is, we programmatically trigger a CXSetHeldCallAction(onHold: false) transaction to force recovery and reclaim the audio pipeline." Clean Code Architecture Swift public func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) { log("🚨 Audio session deactivated by OS.") // 0.5s Delay to allow CoreAudio to clear the cellular teardown DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in self?.resumeVoIPCallIfNeeded() } } func resumeVoIPCallIfNeeded() { guard let uuid = CallStateManager.shared.getNewestBy(state: .active)?.uuid else { return } let isOnHold = CallKitManager.shared.callObserver.calls.first { $0.uuid == uuid }?.isOnHold ?? false log("📊 Current VoIP isOnHold status: \(isOnHold)") guard isOnHold else { return } log("🔄 Unholding VoIP call programmatically.") // Apple Workaround: Refresh config right before unholding to fix SessionID 0x0 if let provider = CallKitManager.shared.provider { provider.configuration = provider.configuration } let action = CXSetHeldCallAction(call: uuid, onHold: false) let transaction = CXTransaction(action: action) CXCallController().request(transaction) { [weak self] error in if let error = error { self?.log("❌ Unhold failed: \(error.localizedDescription)") } else { self?.log("✅ Call successfully resumed.") } } } public func provider(_ provider: CXProvider, perform action: CXSetHeldCallAction) { log("provider performSetHeldCallAction") if (action.isOnHold) { action.fulfill() } else { configureAudioSessionEarly() action.fulfill() } }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’26
Reply to Can reproduce in SpeakerBox that CallKit doesn't activate audiosession when call finished by remote caller
I am facing the same issue.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’26