diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 2459fa0f9..5831f51e2 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -125,6 +125,7 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv; mState = LinphoneEnums::fromLinphone(call->getState()); mRemoteAddress = Utils::coreStringToAppString(call->getRemoteAddress()->asStringUriOnly()); + mRemoteUsername = Utils::coreStringToAppString(call->getRemoteAddress()->getUsername()); auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress); if (linphoneFriend) mRemoteName = Utils::coreStringToAppString( @@ -844,5 +845,5 @@ void CallCore::findRemoteLdapFriend(QSharedPointer me) { }); } }); - mLdapMagicSearchModel->search(mRemoteAddress); + mLdapMagicSearchModel->search(mRemoteUsername); } diff --git a/Linphone/core/call/CallCore.hpp b/Linphone/core/call/CallCore.hpp index 74eaabf00..a9bc2d2b2 100644 --- a/Linphone/core/call/CallCore.hpp +++ b/Linphone/core/call/CallCore.hpp @@ -332,6 +332,7 @@ private: QString mLastErrorMessage; QString mRemoteName; + QString mRemoteUsername; QString mRemoteAddress; QString mLocalAddress; bool mTokenVerified = false;