I am using the category - playAndRecord and mode - videoChat with options - duckOthers. But during an audio call when I try to call setActive(true) an exception occurs and when I try to setActive(true) again after the audio call ended, I am not getting any exception, but voice is not coming. Below is what I am trying to do. So once initial session active attempt fails the system is not activating the session.
I have used AVAudioSession.interruptionNotification already but still its not setting the session as desired when audio call is ended.
try session.setCategory(.playAndRecord, mode: .videoChat, options: .duckOthers)
try session.setActive(true)