mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
res_pjsip: Handle reloading when permanent contacts exist and qualify is configured.
This change fixes a problem where permanent contacts being qualified were not being updated. This was caused by the permanent contacts getting a uuid and not a known identifier, causing an inability to look them up when updating in the qualify code. A bug also existed where the new configuration may not be available immediately when updating qualifies. (closes issue ASTERISK-23514) Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/3448/ ........ Merged revisions 412551 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2258,6 +2258,18 @@ static void remove_request_headers(pjsip_endpoint *endpt)
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \internal
|
||||
* \brief Reload configuration within a PJSIP thread
|
||||
*/
|
||||
static int reload_configuration_task(void *obj)
|
||||
{
|
||||
ast_res_pjsip_reload_configuration();
|
||||
ast_res_pjsip_init_options_handling(1);
|
||||
ast_sip_initialize_dns();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
/* The third parameter is just copied from
|
||||
@@ -2409,11 +2421,11 @@ static int load_module(void)
|
||||
|
||||
static int reload_module(void)
|
||||
{
|
||||
if (ast_res_pjsip_reload_configuration()) {
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
if (ast_sip_push_task(NULL, reload_configuration_task, NULL)) {
|
||||
ast_log(LOG_WARNING, "Failed to reload PJSIP\n");
|
||||
return -1;
|
||||
}
|
||||
ast_res_pjsip_init_options_handling(1);
|
||||
ast_sip_initialize_dns();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user