mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
committed by
Joshua Colp
parent
adf32d1191
commit
2b1edee772
@@ -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",
|
||||
|
Reference in New Issue
Block a user