Commit 98a440fe authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix wrong contact field in 200 OK response for an incoming call.

parent 86aa12e9
......@@ -2530,6 +2530,19 @@ void linphone_call_set_contact_op(LinphoneCall* call) {
#else
LinphoneAddress *contact;
#endif
LinphoneProxyConfig *cfg = NULL;
if (call->dest_proxy == NULL) {
/* Try to define the destination proxy if it has not already been done to have a correct contact field in the SIP messages */
linphone_core_get_default_proxy(call->core, &cfg);
call->dest_proxy = cfg;
call->dest_proxy = linphone_core_lookup_known_proxy(call->core, call->log->to, NULL);
if (cfg != call->dest_proxy && call->dest_proxy != NULL) {
ms_message("Overriding default proxy setting for this call:");
ms_message("The used identity will be %s", linphone_proxy_config_get_identity(call->dest_proxy));
}
}
contact=get_fixed_contact(call->core,call,call->dest_proxy);
if (contact){
sal_op_set_contact(call->op, contact);
......
......@@ -3129,7 +3129,6 @@ int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call){
**/
int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params)
{
LinphoneProxyConfig *cfg=NULL;
SalOp *replaced;
SalMediaDescription *new_md;
bool_t was_ringing=FALSE;
......@@ -3175,14 +3174,6 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call,
call->ringing_beep=FALSE;
}
linphone_core_get_default_proxy(lc,&cfg);
call->dest_proxy=cfg;
call->dest_proxy=linphone_core_lookup_known_proxy(lc,call->log->to,NULL);
if (cfg!=call->dest_proxy && call->dest_proxy!=NULL) {
ms_message("Overriding default proxy setting for this call:");
ms_message("The used identity will be %s",linphone_proxy_config_get_identity(call->dest_proxy));
}
/*try to be best-effort in giving real local or routable contact address */
linphone_call_set_contact_op(call);
if (params){
......
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