I'm building a sample voip app in iOS using pjsip version 2.3 (stable). Everything works fine except that bluetooth headset does not work with app.
I'm enabling bluetooth from AVAudioSession by
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionAllowBluetooth error:nil];
I enable the AVAudioSession instance before making a call.
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:YES error:nil];
I disable the AVAudioSession instance after the call ends.
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:NO error:nil];
I also followed the instructions given here
https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone#UnabletosupportBluetoothinput):
But bluetooth does not seem to work at all.
I'm pretty sure this is something to do with pjsip because I created a simple iOS app that could record and play sound that uses AVAudioSession the same way as mentioned above and bluetooth works totally fine.
Device being used : iPhone 5s iOS 8.4
Kindly provide me inputs to configure pjsip so that I can enable bluetooth.
This fix by PJSIP fixed the bluetooth problem: https://trac.pjsip.org/repos/changeset/5142
It seems to be working for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With