Detecting iPhone hardware mute status during call

AM
Aaron Magat
Wed, Jul 6, 2016 8:45 PM

Hey Guys,

I have an iPhone application, and I'm trying to detect whether or not the hardware mute button for the iPhone is switched on/off, specifically while in the middle of a pjsip call.

I've taken the approach of playing a short silent noise and checking the speed of completion to see if the phone is on mute or not.

In order to play the sound, I've used the AudioServicesPlaySystemSound(sound_id) function from <AudioToolbox/AudioToolbox.h>, and this approach works in my application when not in the middle of a pjsip call.

However, once the call is made and established, my silent sound is no longer played.

I've found a few links related to this, namely http://stackoverflow.com/questions/19047771/ios-pjsip-play-a-sound-during-sip-call, but none seem to fit my needs or provide a valid solution.

Thus, I was wondering if anyone had a solution for detecting the position of the hardware mute button while in the middle of a call, or if there is a way of getting AudioServicesPlaySystemSound(sound_id) to function correctly during the call.

Thanks

Hey Guys, I have an iPhone application, and I'm trying to detect whether or not the hardware mute button for the iPhone is switched on/off, specifically while in the middle of a pjsip call. I've taken the approach of playing a short silent noise and checking the speed of completion to see if the phone is on mute or not. In order to play the sound, I've used the AudioServicesPlaySystemSound(sound_id) function from <AudioToolbox/AudioToolbox.h>, and this approach works in my application when not in the middle of a pjsip call. However, once the call is made and established, my silent sound is no longer played. I've found a few links related to this, namely http://stackoverflow.com/questions/19047771/ios-pjsip-play-a-sound-during-sip-call, but none seem to fit my needs or provide a valid solution. Thus, I was wondering if anyone had a solution for detecting the position of the hardware mute button while in the middle of a call, or if there is a way of getting AudioServicesPlaySystemSound(sound_id) to function correctly during the call. Thanks