summaryrefslogtreecommitdiff
path: root/res/res_pjsip_registrar.c
diff options
context:
space:
mode:
authorAlexei Gradinari <alex2grad@gmail.com>2016-04-15 15:26:15 -0400
committerJoshua Colp <jcolp@digium.com>2016-05-02 10:01:40 -0300
commit2b1edee772ae3690d060bd067b489cbbb72b24f5 (patch)
tree76e6da16c355d891ac09ff29a1feb604360bb15a /res/res_pjsip_registrar.c
parentadf32d11918fea837d1e12c526876b78ba4f6cb0 (diff)
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. ASTERISK-25931 Change-Id: Ia8f6bd2267809c78753b52bcf21835b9b59f4cb8
Diffstat (limited to 'res/res_pjsip_registrar.c')
-rw-r--r--res/res_pjsip_registrar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c
index ae8440aab..65fd56c02 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",