audiosession category was wrongly updated from playandrecord to playback, which cause no audio on Audiosession by counting down alarm.

Hi All,

I am working on VoIP application, when a call receive, my app will activate audio session with playandrecord.

However, the issue is during a call, if there Alarm triggered, like set Clock Timer count down for 5 seconds,

when 5 seconds clock Alarm triggered, my app will receive Category update event, and switch my audio session from playandrecord to playback. the alarm does not send interrupt notification.

    AVAudioSessionRouteChangePreviousRouteKey = "<AVAudioSessionRouteDescription: 0x282bd5e60, \ninputs = (\n    \"<AVAudioSessionPortDescription: 0x282bd66d0, type = MicrophoneBuiltIn; name = iPhone Microphone; UID = Built-In Microphone; selectedDataSource = (null)>\"\n); \noutputs = (\n    \"<AVAudioSessionPortDescription: 0x282bd63f0, type = Receiver; name = Receiver; UID = Built-In Receiver; selectedDataSource = (null)>\"\n)>";
    AVAudioSessionRouteChangeReasonKey = 3;
}}

What is best to check such event to reactive audio session with correct category.

if I do it on cellular call, once the Alarm is triggered, it will play vibration, there is tone at all.

audiosession category was wrongly updated from playandrecord to playback, which cause no audio on Audiosession by counting down alarm.
 
 
Q