mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-30 17:36:22 +00:00
Fix wrong contact field in 200 OK response for an incoming call.
This commit is contained in:
parent
86aa12e97e
commit
98a440fe32
2 changed files with 13 additions and 9 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue