We are also running into the similar problem -
1. User is on CallKit VoIP call using our app.
2. User receives incoming GSM call.
3. CallKit UI is being displayed and user answers the GSM call. The app receives `AVAudioSessionInterruptionTypeBegan`, and the voip call goes on hold.
4. Now user swaps between calls and goes to VoIP call. At this point, our app is not able to play or record audio because it has received `AVAudioSessionInterruptionTypeBegan` on step#3 but it has not received `AVAudioSessionInterruptionTypeEnded` yet. I noticed if I bring the app to the foreground, the app receives `AVAudioSessionInterruptionTypeEnded` but not before that.
Is there a recommendation on how should we handle this scenario.
I am running into a similar problem as well. My experience is similar to ptank. If the 3rd party GSM call is ended by the 3rd party, the VOIP call never gets back audio control. It appears as if the native phone app still has control over the audio session. The property AVAudioSession.sharedInstance().isOtherAudioPlaying is true and calling AVAudioSession.sharedInstance().setActive(true) causes an error (NSOSStatusErrorDomain Code=561017449).
There is also a StackOverflow post that details this issue as well:
It appears that this has been an issue with CallKit for a long time and there is no solution. Does anyone have a workaround for this issue?