From 6d11f76cc4599aedde62691be4afa6eee0c67399 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 4 Oct 2017 14:23:52 +0200 Subject: [PATCH] Clean the new To uri when creating the new INVITE after a redirection. --- coreapi/sal/sal_op.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coreapi/sal/sal_op.cpp b/coreapi/sal/sal_op.cpp index 40b2cdf26..fe656cf4f 100644 --- a/coreapi/sal/sal_op.cpp +++ b/coreapi/sal/sal_op.cpp @@ -404,6 +404,9 @@ int SalOp::process_redirect(){ this->call_id = NULL; } belle_sip_request_set_uri(request, redirect_uri); + redirect_uri = BELLE_SIP_URI(belle_sip_object_clone(BELLE_SIP_OBJECT(redirect_uri))); + belle_sip_uri_set_port(redirect_uri, 0); + belle_sip_uri_set_transport_param(redirect_uri, nullptr); belle_sip_header_address_set_uri((belle_sip_header_address_t*)to, redirect_uri); send_request(request); return 0;