From 56dc3ca07c79f4dbe536c1cab184eba8194deccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Mon, 31 Jul 2023 09:37:28 -0400 Subject: [PATCH] sip: fix blind transfer Change-Id: I6cc0572084acdc4b199d9ab23edc2c640c22a7ea --- src/sip/sipcall.cpp | 2 +- src/uri.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index 6dc20a7e0b..38ddfa3fb8 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -1283,7 +1283,7 @@ SIPCall::transfer(const std::string& to) if (Call::isRecording()) stopRecording(); - auto uri = Uri(to); + auto uri = Uri(account->getToUri(to)); const pj_str_t dst(CONST_PJ_STR(uri.authority())); JAMI_DBG("[call:%s] Transferring to %.*s", getCallId().c_str(), (int) dst.slen, dst.ptr); diff --git a/src/uri.cpp b/src/uri.cpp index dbefe056bf..2b2a4077a4 100644 --- a/src/uri.cpp +++ b/src/uri.cpp @@ -49,6 +49,10 @@ Uri::Uri(const std::string_view& uri) } else { authority_ = uri; } + auto posParams = authority_.find(';'); + if (posParams != std::string::npos) { + authority_ = authority_.substr(0, posParams); + } } const std::string& -- GitLab