Pjsip turn on loudspeaker on ios des not work

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

+5
source share
1 answer

I updated pjsip to version 2.0.1 and the code above works without problems.

+2
source

All Articles