IPhone 14 Audio Issue for VOIP apps

We are experiencing an audio issue on iPhone 14 Pro when using Agora SDK with custom audio recording using AVCaptureSession and AVAssetWriter. There is no problem on iPhone 13 and older devices. Also interesting to note is that when an iPhone 14 device is the only device in the call, no error happens. The error happens when there is another device in the call sending audio to iPhone 14. We think that the problem happens when the iPhone 14 speakerphone is open and at the same time as the microphone from another AVCaptureSession is trying to capture samples.

Here is a link to a sample app and detailed steps to reproduce the issue: https://www.dropbox.com/sh/5486wrisnv6hdqu/AACNqKwbTNJhrvwE0EjTWzfza?dl=0

IPhone 14 Audio Issue for VOIP apps
 
 
Q