I have not seen any issues with didActivateAudioSession not getting called by iOS in many many years with many thousands of devices.
However with iOS27 beta code I have seen a few times that when making an outgoing call it never gets called.
All subsequent outgoing calls fail until I dismiss and relaunch the App.
Sorry for not following up on this earlier, I didn't see this thread until today.
The rest of this post goes into the details of what's going on; however, two critical points I want to highlight:
-
This issue is a longstanding issue that can happen across a broad range of system releases. I would strongly recommend applying the workaround as a preventative measure.
-
We shipped a fix for this in iOS 27 beta 5, so if an issue like this occurs again after that point, please file a new bug and then file a code-level support request asking for my help. I'd like to close this issue down "for good", so I want to know if anything like it starts happening again.
I have not seen any issues with didActivateAudioSession not getting called by iOS in many, many years with many thousands of devices.
Unfortunately, I think this is mostly a case of timing and luck. There's a longstanding issue that I only recently came to understand that causes exactly the behavior you're seeing. There's an extended forum thread on the issue here, but the workaround is fairly simple— just call "setConfiguration" before you report a call.
Internally, this pushes your app’s latest AudioSession ID into callservicesd, ensuring that it's able to then activate the call.
Covering a few details:
Then one outgoing call failed, and every subsequent call failed until I restarted the app.
This is standard behavior for the bug above. callservicesd has an invalid session ID for your app, so it stays "stuck" in that state until it gets a new ID, which is what "setConfiguration" does.
Looking at your bug:
FB23709940
In the console log archive, searching for "failed due to session lookup failure for SessionID" will find many messages like this:
2026-07-09 18:08:10.401677+0100 audiomxd: (AudioSessionServer) [com.apple.coreaudio:as_server] AVAudioSessionXPCServer.mm:231 -[AVAudioSessionRemoteXPCClient createProxySession:reply:] failed due to session lookup failure for SessionID 0x0
Have there been similar reports of this from other VoIP app developers with iOS27?
I'm not aware of any specific issue tied to iOS 27 (note that the thread about is about iOS 18). Having said that, the exact circumstances that create the bug are not well understood and it's very likely that changes within the OS can make the issue more or less likely, particularly when combined with changes to your own implementation.
Has that area of the framework been modified in iOS27?
CallKit hasn't, but the problem here is that CallKit isn't where the problem originates. The problem actually "starts" with your app getting an invalid session ID from the audio system, which it then hands to CallKit. The audio system is basically "always" changing, which is what's made identifying the exact underlying cause somewhat challenging.
For example, if didActivateAudioSession does not happen after 10 seconds, then what should I do?
So, I strongly suspect that the setConfiguration workaround I mentioned above will resolve all/most of these issues. However, if it DOESN'T work, then my suggestion would be that you inform the user there’s a problem and that they need to restart your app. I think what I would actually do is:
-
Collect any diagnostic data you want to collect.
-
Post an alert telling the user there's an issue.
-
When the user touches “OK", call abort() and intentionally crash your app. Do this in a "distinctly" named function ("SessionActivateFAIL_CrashingNow()") so you can clearly identify this particular crash from any other app issue.
My expectation is that this will rarely, if ever, occur, as my workaround has been extremely successful (see the reports in the thread above). However, if the setConfiguration fails, then I'm not confident your app will really be able to recover.
Notably, the issue on this thread:
Back in Oct 2016 (!!) there was a thread for a similar issue https://developer.apple.com/forums/thread/64544?answerId=191868022#191868022
They were “one-off failures" rather than the app completely failing for every subsequent call, which is what I see now.
Apple's Stuart Montgomery mentioned it was reported in Radar # 28774388 and suggested workarounds at that time.
...was related to a very specific timing issue between CallKit's calling process, audio initialization, and app start-up. More the point, it was actually reported against iOS 10, which is when CallKit was originally introduced. That particular bug was addressed years ago, but, more importantly, most of this code was reworked when we redesigned the call UI a few years ago.
The critical point here is that the reason the problem persists is that the problem is with callservicesd's management of your audio session, NOT your app’s side of the session. If setConfiguration doesn't fix the issue, then I wouldn't expect anything else to fix it.
At that time I found that if I "configureAudioSession" in the completion block of a successful theMDSCXProvider reportNewIncomingCallWithUUID:theUUID update:theCallUpdate completion
My longstanding advice on this issue has been to "do what Speakerbox does", which means configuring your audio session just before you fulfil CXStartCallAction and CXAnswerCallAction. Timing-wise, that's similar to the point you'd be when reportNewIncomingCallWithUUID completes, but audio session configuration issues are common enough that I would still recommend simply copying what our sample does.
I have found a way where we can repeat this issue as follows in iOS27Beta4
Interesting. That's the first repeatable case I've seen for this. Please let me know if this also happens on beta 5 and later.
I am presuming this is some type of race condition after UNLOCK where iOS is setting up something to do with Callkit and if at the same time my App opens and creates an instance of CXProvider then something gets messed up.
Sort of. I believe you’re actually managing to initialize your app’s provider stack before the audio system is "live", which then hands a bad session ID to callservicesd. My guess is that significant audio initialization is being triggered at first unlock, which makes it easier to win the race.
When do you actually create your provider? And do you initialize your audio session before you create your provider?
and then I create a brand new theMDSCXProvider. When I did that I cannot repeat the problem
Creating a new provider implicitly means that you're calling setConfiguration, which pushes the current session ID.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware