diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index de51a7f2aa75a4dfeedbc99a370841b3316505a5..e30f353a6c8846991ce64d15487cd36ffc0ccb9b 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -42,12 +42,16 @@
 // LLSD map lookups
 static const std::string SL_ID("sl_id");
 static const std::string DISPLAY_NAME("display_name");
+static const std::string LEGACY_FIRST_NAME("legacy_first_name");
+static const std::string LEGACY_LAST_NAME("legacy_last_name");
 static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default");
 static const std::string DISPLAY_NAME_EXPIRES("display_name_expires");
 
 LLAvatarName::LLAvatarName()
 :	mUsername(),
 	mDisplayName(),
+	mLegacyFirstName(),
+	mLegacyLastName(),
 	mIsDisplayNameDefault(false),
 	mIsDummy(false),
 	mExpires(F64_MAX)
@@ -68,6 +72,8 @@ LLSD LLAvatarName::asLLSD() const
 	// "SLID" to "Username", but it was too late to change the wire format.
 	sd[SL_ID] = mUsername;
 	sd[DISPLAY_NAME] = mDisplayName;
+	sd[LEGACY_FIRST_NAME] = mLegacyFirstName;
+	sd[LEGACY_LAST_NAME] = mLegacyLastName;
 	sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault;
 	sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires);
 	return sd;
@@ -77,6 +83,8 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
 {
 	mUsername = sd[SL_ID].asString(); // see asLLSD() above
 	mDisplayName = sd[DISPLAY_NAME].asString();
+	mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString();
+	mLegacyLastName = sd[LEGACY_LAST_NAME].asString();
 	mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean();
 	LLDate expires = sd[DISPLAY_NAME_EXPIRES];
 	mExpires = expires.secondsSinceEpoch();
@@ -96,3 +104,13 @@ std::string LLAvatarName::getNameAndSLID() const
 	}
 	return name;
 }
+
+std::string LLAvatarName::getLegacyName() const
+{
+	std::string name;
+	name.reserve( mLegacyFirstName.size() + 1 + mLegacyLastName.size() );
+	name = mLegacyFirstName;
+	name += " ";
+	name += mLegacyLastName;
+	return name;
+}
diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h
index 39071ec4c78733001db8192c1f8bc19b0dc5da10..fb5cb277a28f566d5dc8e0ad6a4567034d64b99d 100644
--- a/indra/llcommon/llavatarname.h
+++ b/indra/llcommon/llavatarname.h
@@ -53,14 +53,31 @@ class LL_COMMON_API LLAvatarName
 	// When display names are disabled returns just "James Linden"
 	std::string getNameAndSLID() const;
 
+	// Returns "James Linden" or "bobsmith123 Resident" for backwards
+	// compatibility with systems like voice and muting
+	// *TODO: Eliminate this in favor of username only
+	std::string getLegacyName() const;
+
 	// "bobsmith123" or "james.linden", US-ASCII only
 	std::string mUsername;
 
 	// "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode
 	// Contains data whether or not user has explicitly set
-	// a display name; may duplicate their SLID.
+	// a display name; may duplicate their username.
 	std::string mDisplayName;
 
+	// For "James Linden", "James"
+	// For "bobsmith123", "bobsmith123"
+	// Used to communicate with legacy systems like voice and muting which
+	// rely on old-style names.
+	// *TODO: Eliminate this in favor of username only
+	std::string mLegacyFirstName;
+
+	// For "James Linden", "Linden"
+	// For "bobsmith123", "Resident"
+	// see above for rationale
+	std::string mLegacyLastName;
+
 	// If true, both display name and SLID were generated from
 	// a legacy first and last name, like "James Linden (james.linden)"
 	bool mIsDisplayNameDefault;