Commit ced44d17 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add lpconfig option to set the default value for defer_update.

parent 9afcf491
......@@ -663,7 +663,7 @@ static void call_updated_by_remote(LinphoneCore *lc, LinphoneCall *call, bool_t
if ( call->state == LinphoneCallStreamsRunning) {
/*reINVITE and in-dialogs UPDATE go here*/
linphone_core_notify_display_status(lc,_("Call is updated by remote."));
call->defer_update=FALSE;
call->defer_update = lp_config_get_int(lc->config, "sip", "defer_update_default", FALSE);
linphone_call_set_state(call, LinphoneCallUpdatedByRemote,"Call updated by remote");
if (call->defer_update==FALSE){
linphone_core_accept_call_update(lc,call,NULL);
......@@ -676,7 +676,7 @@ static void call_updated_by_remote(LinphoneCore *lc, LinphoneCall *call, bool_t
/* Case where no SDP is present and we were paused by remote.
* We send back an ACK with our SDP and expect the remote to send its own.
* No state change here until an answer is received. */
call->defer_update=FALSE;
call->defer_update = lp_config_get_int(lc->config, "sip", "defer_update_default", FALSE);
if (call->defer_update==FALSE){
_linphone_core_accept_call_update(lc,call,NULL,call->state,linphone_call_state_to_string(call->state));
}
......
......@@ -3563,10 +3563,11 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
* When receiving a #LinphoneCallUpdatedByRemote state notification, prevent LinphoneCore from performing an automatic answer.
*
* When receiving a #LinphoneCallUpdatedByRemote state notification (ie an incoming reINVITE), the default behaviour of
* LinphoneCore is to automatically answer the reINIVTE with call parameters unchanged.
* LinphoneCore is defined by the "defer_update_default" option of the "sip" section of the config. If this option is 0 (the default)
* then the LinphoneCore automatically answers the reINIVTE with call parameters unchanged.
* However when for example when the remote party updated the call to propose a video stream, it can be useful
* to prompt the user before answering. This can be achieved by calling linphone_core_defer_call_update() during
* the call state notifiacation, to deactivate the automatic answer that would just confirm the audio but reject the video.
* the call state notification, to deactivate the automatic answer that would just confirm the audio but reject the video.
* Then, when the user responds to dialog prompt, it becomes possible to call linphone_core_accept_call_update() to answer
* the reINVITE, with eventually video enabled in the LinphoneCallParams argument.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment