From ef26482305899765fdf8044dad4baeffeb66b26b Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 22 Nov 2017 16:44:51 +0100 Subject: [PATCH] Do not remove gr parameter from the address put in a To header. --- coreapi/linphonecore.c | 14 +------------- src/sal/op.cpp | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index e1ea4e478..88c8b1bc9 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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); diff --git a/src/sal/op.cpp b/src/sal/op.cpp index 896aafd45..32398aa15 100644 --- a/src/sal/op.cpp +++ b/src/sal/op.cpp @@ -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());