Thanks Sebastian for your quick feedback I know there is no documented way to detect the switch thats why I was trying querying this property but it was not that reliable. I thought that nil is fine as if I have the mute off, ie audio is on, and then I receive a call, the returned value from the API would be Speaker. That is why I thought that after i hang up PJSIP does not reset the property. ANy ways it is not a big issue. As you said I will live with it. Fadi On Mon, Mar 19, 2012 at 9:26 AM, <s.marek at avm.de> wrote: > Hi Fadi, > > did you check the return value of AudioSessionGetProperty the first time > you call it? Maybe your audio session is not initialized and that's why > you get nil. To me getting nil is *not* "the expected behavior". ;) > > AFAIK there is no documented way to detect the position of the ring-silent > switch on an iOS device. And if you think long enough you actually can > live with that. > > "ReceiverAndMicrophone" is not a problem, but the truth. > > Sebastian. > > > pjsip-bounces at lists.pjsip.org schrieb am 19.03.2012 10:06:26: > > | Von: Fadi Chehimi <fchehimi at gmail.com> > | An: pjsip list <pjsip at lists.pjsip.org> > | Datum: 19.03.2012 10:06 > | Betreff: [pjsip] Audio Rout Property for iOS > | Gesendet von: pjsip-bounces at lists.pjsip.org > | > | Hi > | > | I am trying to play with the AudioSessionGetProperty API of iOS > | AudioServices to check whether the Speaker is being used or not but > | I got a weird behaviour with PJSIP calls. > | > | If the iPhone is set to mute, the AudioSessionGetProperty > | (kAudioSessionProperty_AudioRoute, &propertySize, &state); returns > | (null) which is the expected behaviour. But when I receive a VOIP > | call through PJSIP and then hang up, i check the value when I > | receive the next call and it is set to ReceiverAndMicrophone which > | makes me think that PJSIP does not reset the property after a call > | is finished. Can you please confirm this, and advice what fix should > | be added for this, if any? > | > | Cheers > | Fadi > | _______________________________________________ > | Visit our blog: http://blog.pjsip.org > | > | pjsip mailing list > | pjsip at lists.pjsip.org > | http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120319/559c78de/attachment.html>