From e0e3838ccf61141e7ca4ae77ceb1d9a994b496b0 Mon Sep 17 00:00:00 2001 From: gaelle Date: Tue, 25 Feb 2025 11:53:13 +0100 Subject: [PATCH] try to fix display name after call transfer (take the call log address instead of the call address) (may be a mitel server problem) --- Linphone/core/call-history/CallHistoryCore.cpp | 2 +- Linphone/core/call/CallCore.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Linphone/core/call-history/CallHistoryCore.cpp b/Linphone/core/call-history/CallHistoryCore.cpp index df5307d6..d07ac379 100644 --- a/Linphone/core/call-history/CallHistoryCore.cpp +++ b/Linphone/core/call-history/CallHistoryCore.cpp @@ -61,7 +61,7 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr &callL mDisplayName = Utils::coreStringToAppString(confinfo->getSubject()); } else { mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly()); - auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress); + auto linphoneFriend = ToolModel::findFriendByAddress(addr); if (linphoneFriend) { mFriendModel = Utils::makeQObject_ptr(linphoneFriend); mDisplayName = mFriendModel->getFullName(); diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 8042dc56..f70dd341 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -117,11 +117,11 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt mRemoteVideoEnabled = videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv; mState = LinphoneEnums::fromLinphone(call->getState()); - auto remoteAddress = call->getRemoteAddress()->clone(); + auto remoteAddress = call->getCallLog()->getRemoteAddress()->clone(); remoteAddress->clean(); mRemoteAddress = Utils::coreStringToAppString(remoteAddress->asStringUriOnly()); mRemoteUsername = Utils::coreStringToAppString(remoteAddress->getUsername()); - auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress); + auto linphoneFriend = ToolModel::findFriendByAddress(remoteAddress); if (linphoneFriend) mRemoteName = Utils::coreStringToAppString( linphoneFriend->getVcard() ? linphoneFriend->getVcard()->getFullName() : linphoneFriend->getName());