From f83abf478fd994619807a103e946a6a253fd904c Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 21 Oct 2014 16:27:23 +0200 Subject: [PATCH] fix automatically accept video call --- Classes/LinphoneManager.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 7c76a02af..994f7f220 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1703,7 +1703,7 @@ static void audioRouteChangeListenerCallback ( #pragma mark - Call Functions - (void)acceptCall:(LinphoneCall *)call { - LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters(theLinphoneCore); + LinphoneCallParams* lcallParams = linphone_core_create_call_params(theLinphoneCore,call); if([self lpConfigBoolForKey:@"edge_opt_preference"]) { bool low_bandwidth = self.network == network_2g; if(low_bandwidth) { @@ -1712,12 +1712,6 @@ static void audioRouteChangeListenerCallback ( linphone_call_params_enable_low_bandwidth(lcallParams, low_bandwidth); } - // workaround for video policy not correctly updated for automatic accept - BOOL video = linphone_call_params_video_enabled(lcallParams); - const LinphoneVideoPolicy* policy = linphone_core_get_video_policy(theLinphoneCore); - video &= policy->automatically_accept; - linphone_call_params_enable_video(lcallParams, video); - linphone_core_accept_call_with_params(theLinphoneCore,call, lcallParams); }