Do not remove gr parameter from the address put in a To header.

This commit is contained in:
Ghislain MARY 2017-11-22 16:44:51 +01:00
parent 6999d35423
commit ef26482305
2 changed files with 1 additions and 14 deletions

View file

@ -3564,19 +3564,7 @@ void linphone_configure_op_with_proxy(LinphoneCore *lc, SalOp *op, const Linphon
linphone_transfer_routes_to_op(routes,op);
}
const SalAddress *sal_dest = L_GET_PRIVATE_FROM_C_OBJECT(dest)->getInternalAddress();
if (sal_address_has_uri_param(sal_dest,"gr")) {
/*in case of gruu destination remove gruu parram from to*/
SalAddress *dest_copy = sal_address_clone(sal_dest);
sal_address_remove_uri_param(dest_copy,"gr");
op->set_to_address(dest_copy);
sal_address_unref(dest_copy);
} else {
char *addr = linphone_address_as_string(dest);
op->set_to(addr);
ms_free(addr);
}
op->set_to_address(L_GET_PRIVATE_FROM_C_OBJECT(dest)->getInternalAddress());
if (op->getUseGruuInFrom() && contactAddr && linphone_address_has_uri_param(contactAddr, "gr")) {
char *contactAddrStr = linphone_address_as_string_uri_only(contactAddr);
op->set_from(contactAddrStr);

View file

@ -620,7 +620,6 @@ belle_sip_request_t* SalOp::build_request(const char* method) {
belle_sip_uri_set_secure(req_uri,is_secure());
to_header = belle_sip_header_to_create(BELLE_SIP_HEADER_ADDRESS(to_address),NULL);
belle_sip_parameters_remove_parameter(BELLE_SIP_PARAMETERS(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(to_header))), "gr"); /*remove gruu in any case*/
call_id_header = belle_sip_provider_create_call_id(prov);
if (get_call_id()) {
belle_sip_header_call_id_set_call_id(call_id_header, get_call_id());