diff --git a/CHANGES b/CHANGES
index 1f5ea540611e36a6f9c29580a8daa07f25683f10..9f067bd9f7f596f864ba9f71bfc24cee7f3b1cc4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -272,6 +272,15 @@ Queue
  * Show the time when started the last pause for queue member on CLI for command
    'queue show'.
 
+--- Functionality changes from Asterisk 13.9.0 to Asterisk 13.10.0 -----------
+------------------------------------------------------------------------------
+
+res_pjsip
+------------------
+ * Added "reg_server" to contacts.
+   If the Asterisk system name is set in asterisk.conf, it will be stored
+   into the "reg_server" field in the ps_contacts table to facilitate
+   multi-server setups.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 13.8.0 to Asterisk 13.9.0 ------------
diff --git a/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
new file mode 100644
index 0000000000000000000000000000000000000000..8bd151bd7a94142debfb39fec6abcbf9a091be97
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
@@ -0,0 +1,25 @@
+"""pjsip: add contact reg_server
+
+Revision ID: 81b01a191a46
+Revises: 65eb22eb195
+Create Date: 2016-04-15 15:00:35.024525
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '81b01a191a46'
+down_revision = '65eb22eb195'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.add_column('ps_contacts', sa.Column('reg_server', sa.String(20)))
+    op.drop_constraint(UniqueConstraint('id'), 'ps_contacts', type_='unique')
+    op.create_unique_constraint('ps_contacts_uq', 'ps_contacts', ['id','reg_server'])
+
+def downgrade():
+    op.drop_constraint('ps_contacts_uq', 'ps_contacts', type_='unique')
+    op.drop_column('reg_server')
+    op.create_unique_constraint(None, 'ps_contacts', 'id')
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 6939d2759439e2c2652c9e3208a8462e19f9e676..b6684ae56f91710fc736ba6e5ab542fe45634ced 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -248,6 +248,8 @@ struct ast_sip_contact {
 	double qualify_timeout;
 	/*! Endpoint that added the contact, only available in observers */
 	struct ast_sip_endpoint *endpoint;
+	/*! Asterisk Server name */
+	AST_STRING_FIELD_EXTENDED(reg_server);
 };
 
 #define CONTACT_STATUS "contact_status"
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 6890e637baa2a7db41c3ca35a27cf1f606df1538..db3395fa704132bf5a27bf9cc486bf3f4e02725d 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -1112,6 +1112,12 @@
 						REGISTER requests and is not intended to be configured manually.
 					</para></description>
 				</configOption>
+				<configOption name="reg_server">
+					<synopsis>Asterisk Server name</synopsis>
+					<description><para>
+						Asterisk Server name on which SIP endpoint registered.
+					</para></description>
+				</configOption>
 			</configObject>
 			<configObject name="aor">
 				<synopsis>The configuration for a location of an endpoint</synopsis>
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index db4f9ac0995b51ba08a272549852ccabdec542f5..2779fe3969edf3c83aba2c0997e99a94fa32c37e 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -23,6 +23,7 @@
 #include "asterisk/res_pjsip.h"
 #include "asterisk/logger.h"
 #include "asterisk/astobj2.h"
+#include "asterisk/paths.h"
 #include "asterisk/sorcery.h"
 #include "include/res_pjsip_private.h"
 #include "asterisk/res_pjsip_cli.h"
@@ -119,6 +120,8 @@ static void *contact_alloc(const char *name)
 		return NULL;
 	}
 
+	ast_string_field_init_extended(contact, reg_server);
+
 	/* Dynamic contacts are delimited with ";@" and static ones with "@@" */
 	if ((aor_separator = strstr(id, ";@")) || (aor_separator = strstr(id, "@@"))) {
 		*aor_separator = '\0';
@@ -330,6 +333,10 @@ int ast_sip_location_add_contact_nolock(struct ast_sip_aor *aor, const char *uri
 		ast_string_field_set(contact, user_agent, user_agent);
 	}
 
+	if (!ast_strlen_zero(ast_config_AST_SYSTEM_NAME)) {
+		ast_string_field_set(contact, reg_server, ast_config_AST_SYSTEM_NAME);
+	}
+
 	contact->endpoint = ao2_bump(endpoint);
 
 	return ast_sorcery_create(ast_sip_get_sorcery(), contact);
@@ -1111,6 +1118,7 @@ int ast_sip_initialize_sorcery_location(void)
 	ast_sorcery_object_field_register(sorcery, "contact", "qualify_timeout", "3.0", OPT_DOUBLE_T, 0, FLDSET(struct ast_sip_contact, qualify_timeout));
 	ast_sorcery_object_field_register(sorcery, "contact", "outbound_proxy", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, outbound_proxy));
 	ast_sorcery_object_field_register(sorcery, "contact", "user_agent", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, user_agent));
+	ast_sorcery_object_field_register(sorcery, "contact", "reg_server", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, reg_server));
 
 	ast_sorcery_object_field_register(sorcery, "aor", "type", "", OPT_NOOP_T, 0, 0);
 	ast_sorcery_object_field_register(sorcery, "aor", "minimum_expiration", "60", OPT_UINT_T, 0, FLDSET(struct ast_sip_aor, minimum_expiration));
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c
index ae8440aabe7e33bfc0388b43767e07f93f8b10ff..65fd56c02ddc7a5c310b30d16629ddf03cb0a580 100644
--- a/res/res_pjsip_registrar.c
+++ b/res/res_pjsip_registrar.c
@@ -30,6 +30,7 @@
 
 #include "asterisk/res_pjsip.h"
 #include "asterisk/module.h"
+#include "asterisk/paths.h"
 #include "asterisk/test.h"
 #include "asterisk/taskprocessor.h"
 #include "asterisk/manager.h"
@@ -555,6 +556,9 @@ static int rx_task_core(struct rx_task_data *task_data, struct ao2_container *co
 			if (user_agent) {
 				ast_string_field_set(contact_update, user_agent, user_agent);
 			}
+			if (!ast_strlen_zero(ast_config_AST_SYSTEM_NAME)) {
+				ast_string_field_set(contact_update, reg_server, ast_config_AST_SYSTEM_NAME);
+			}
 
 			if (ast_sip_location_update_contact(contact_update)) {
 				ast_log(LOG_ERROR, "Failed to update contact '%s' expiration time to %d seconds.\n",