video_stream_start_ice_gathering(call->videostream);
linphone_core_gather_ice_candidates(lc, call);
} else {
- linphone_core_update_call(lc, call, params);
+ if (linphone_call_get_state(call) == LinphoneCallUpdatedByRemote) {
+ linphone_core_accept_call_update(lc, call, params);
+ } else {
+ linphone_core_update_call(lc, call, params);
+ }
}
} else {
if (ice_session != NULL) {
ice_session_remove_check_list(ice_session, call->videostream->ice_check_list);
call->videostream->ice_check_list = NULL;
}
- linphone_core_update_call(lc, call, params);
+ if (linphone_call_get_state(call) == LinphoneCallUpdatedByRemote) {
+ linphone_core_accept_call_update(lc, call, params);
+ } else {
+ linphone_core_update_call(lc, call, params);
+ }
}
linphone_call_params_destroy(params);
}
RtpTransport *vrtcp=lc->rtptf->video_rtcp_func(lc->rtptf->video_rtcp_func_data, call->video_port+1);
rtp_session_set_transports(call->videostream->session,vrtp,vrtcp);
}
- if ((linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce) && (ice_session != NULL)){
+ if ((linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce) && (ice_session != NULL) && (ice_session_check_list(ice_session, 1))){
rtp_session_set_pktinfo(call->videostream->session, TRUE);
call->videostream->ice_check_list = ice_session_check_list(ice_session, 1);
ice_check_list_set_rtp_session(call->videostream->ice_check_list, call->videostream->session);
LinphoneCallParams *params;
switch (call->state) {
case LinphoneCallStreamsRunning:
+ case LinphoneCallUpdatedByRemote:
if (evd->info.ice_processing_successful==TRUE) {
ice_session_compute_candidates_foundations(ice_session);
ice_session_eliminate_redundant_candidates(ice_session);
}
params = linphone_call_params_copy(linphone_call_get_current_params(call));
linphone_call_params_enable_video(params, TRUE);
- linphone_core_update_call(call->core, call, params);
+ if (call->state == LinphoneCallStreamsRunning) {
+ linphone_core_update_call(call->core, call, params);
+ } else { /* LinphoneCallUpdatedByRemote */
+ linphone_core_accept_call_update(call->core, call, params);
+ }
linphone_call_params_destroy(params);
break;
case LinphoneCallOutgoingInit:
static void on_call_updated_response(GtkWidget *dialog, gint responseid, LinphoneCall *call){
if (linphone_call_get_state(call)==LinphoneCallUpdatedByRemote){
- LinphoneCore *lc=linphone_call_get_core(call);
- LinphoneCallParams *params=linphone_call_params_copy(linphone_call_get_current_params(call));
- linphone_call_params_enable_video(params,responseid==GTK_RESPONSE_YES);
- linphone_core_accept_call_update(lc,call,params);
- linphone_call_params_destroy(params);
+ linphone_call_enable_video(call, responseid==GTK_RESPONSE_YES);
}
linphone_call_unref(call);
g_source_remove_by_user_data(dialog);