mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
do not put contact_params (from proxy config) into calls, message or subscribes. They are only valid for REGISTERs.
This commit is contained in:
parent
e1c0e1aa4f
commit
7c16a6d9db
2 changed files with 15 additions and 13 deletions
|
|
@ -2628,11 +2628,7 @@ static LinphoneAddress *get_fixed_contact(LinphoneCore *lc, LinphoneCall *call ,
|
|||
}
|
||||
|
||||
void linphone_call_set_contact_op(LinphoneCall* call) {
|
||||
#ifndef USE_BELLESIP
|
||||
char *contact;
|
||||
#else
|
||||
LinphoneAddress *contact;
|
||||
#endif
|
||||
|
||||
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 */
|
||||
|
|
@ -2641,11 +2637,10 @@ void linphone_call_set_contact_op(LinphoneCall* call) {
|
|||
|
||||
contact=get_fixed_contact(call->core,call,call->dest_proxy);
|
||||
if (contact){
|
||||
SalTransport tport=sal_address_get_transport((SalAddress*)contact);
|
||||
sal_address_clean((SalAddress*)contact); /* clean out contact_params that come from proxy config*/
|
||||
sal_address_set_transport((SalAddress*)contact,tport);
|
||||
sal_op_set_contact(call->op, contact);
|
||||
#ifndef USE_BELLESIP
|
||||
ms_free(contact);
|
||||
#else
|
||||
linphone_address_destroy(contact);
|
||||
#endif
|
||||
}
|
||||
linphone_address_destroy(contact);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2615,10 +2615,17 @@ void linphone_configure_op(LinphoneCore *lc, SalOp *op, const LinphoneAddress *d
|
|||
sal_op_set_to_address(op,dest);
|
||||
sal_op_set_from(op,identity);
|
||||
sal_op_set_sent_custom_header(op,headers);
|
||||
if (with_contact && proxy && proxy->op && sal_op_get_contact(proxy->op)){
|
||||
sal_op_set_contact(op,sal_op_get_contact(proxy->op));
|
||||
if (with_contact && proxy && proxy->op){
|
||||
const SalAddress *contact;
|
||||
if ((contact=sal_op_get_contact(proxy->op))){
|
||||
SalTransport tport=sal_address_get_transport((SalAddress*)contact);
|
||||
SalAddress *new_contact=sal_address_clone(contact);
|
||||
sal_address_clean(new_contact); /* clean out contact_params that come from proxy config*/
|
||||
sal_address_set_transport(new_contact,tport);
|
||||
sal_op_set_contact(op,new_contact);
|
||||
sal_address_destroy(new_contact);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue