diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 7f11028ab..d3212a9f6 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1767,16 +1767,16 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){ if (evt == ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED) { switch (ice_session_state(call->ice_session)) { case IS_Completed: + ice_session_select_candidates(call->ice_session); if (ice_session_role(call->ice_session) == IR_Controlling) { - ice_session_select_candidates(call->ice_session); linphone_core_update_call(call->core, call, &call->current_params); } break; case IS_Failed: if (ice_session_has_completed_check_list(call->ice_session) == TRUE) { + ice_session_select_candidates(call->ice_session); if (ice_session_role(call->ice_session) == IR_Controlling) { /* At least one ICE session has succeeded, so perform a call update. */ - ice_session_select_candidates(call->ice_session); linphone_core_update_call(call->core, call, &call->current_params); } }