linphone_core_update_streams (lc,call,md);
linphone_call_set_state(call,LinphoneCallPausedByRemote,"Call paused by remote");
}else{
- if (call->state==LinphoneCallStreamsRunning){
- /*media was running before, the remote as acceted a call modification (that is
- a reinvite made by us. We must notify the application this reinvite was accepted*/
- linphone_call_set_state(call, LinphoneCallUpdated, "Call updated");
- }else{
+ if (call->state!=LinphoneCallUpdating){
if (call->state==LinphoneCallResuming){
if (lc->vtable.display_status){
lc->vtable.display_status(lc,_("Call resumed."));
if (call->media_pending){
SalMediaDescription *md=sal_call_get_final_media_description(op);
if (md && !sal_media_description_empty(md)){
- if (call->state==LinphoneCallStreamsRunning){
- /*media was running before, the remote as acceted a call modification (that is
- a reinvite made by us. We must notify the application this reinvite was accepted*/
- linphone_call_set_state(call, LinphoneCallUpdated, "Call updated");
- }
linphone_core_update_streams (lc,call,md);
linphone_call_set_state (call,LinphoneCallStreamsRunning,"Connected (streams running)");
}else{
return "LinphoneCallUpdatedByRemote";
case LinphoneCallIncomingEarlyMedia:
return "LinphoneCallIncomingEarlyMedia";
- case LinphoneCallUpdated:
- return "LinphoneCallUpdated";
+ case LinphoneCallUpdating:
+ return "LinphoneCallUpdating";
case LinphoneCallReleased:
return "LinphoneCallReleased";
}
linphone_call_delete_ice_session(call);
}
switch (call->state) {
- case LinphoneCallStreamsRunning:
+ case LinphoneCallUpdating:
linphone_core_start_update_call(call->core, call);
break;
case LinphoneCallUpdatedByRemote:
linphone_call_stop_media_streams_for_ice_gathering(call);
linphone_core_proceed_with_invite_if_ready(call->core, call, NULL);
break;
- default:
+ case LinphoneCallIdle:
linphone_call_stop_media_streams_for_ice_gathering(call);
linphone_core_notify_incoming_call(call->core, call);
break;
+ default:
+ break;
}
} else if (evt == ORTP_EVENT_ICE_LOSING_PAIRS_COMPLETED) {
linphone_core_start_accept_call_update(call->core, call);
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
int err=0;
if (params!=NULL){
+ linphone_call_set_state(call,LinphoneCallUpdating,"Updating call");
#ifdef VIDEO_ENABLED
bool_t has_video = call->params.has_video;
if ((call->ice_session != NULL) && (call->videostream != NULL) && !params->has_video) {
call->videostream->ice_check_list = NULL;
}
call->params = *params;
- if ((call->ice_session != NULL) && (ice_session_state(call->ice_session) != IS_Completed) && !has_video && params->has_video) {
+ if ((call->ice_session != NULL) && !has_video && params->has_video) {
/* Defer call update until the ICE candidates gathering process has finished. */
ms_message("Defer call update to gather ICE candidates");
update_local_media_description(lc, call);
case LinphoneCallConnected:
case LinphoneCallRefered:
case LinphoneCallIncomingEarlyMedia:
- case LinphoneCallUpdated:
+ case LinphoneCallUpdating:
return TRUE;
default:
break;
LinphoneCallPausedByRemote, /**<The call is paused by remote end*/
LinphoneCallUpdatedByRemote, /**<The call's parameters change is requested by remote end, used for example when video is added by remote */
LinphoneCallIncomingEarlyMedia, /**<We are proposing early media to an incoming call */
- LinphoneCallUpdated, /**<The remote accepted the call update initiated by us */
+ LinphoneCallUpdating, /**<A call update has been initiated by us */
LinphoneCallReleased /**< The call object is no more retained by the core */
} LinphoneCallState;