I use this code to try to turn on the speaker on an iOS device.
pjmedia_aud_dev_route route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
pj_status_t status = pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE, &route, PJ_FALSE);
if (status != PJ_SUCCESS){
NSLog(@"Error enabling loudspeaker");
}
I know what I can use kAudioSessionProperty_OverrideAudioRoute, but I want to enable it using pjsip, because then I can transfer PJMEDIA_AUD_DEV_ROUTE_BLUETOOTHto route and enable bluetooth.
I am using pjsip 1.8.5 on iOS 5.0
source
share