[Asterisk-code-review] res_pjsip: prune contacts on Asterisk start at a later time (asterisk[16])
Michael Neuhauser
asteriskteam at digium.com
Tue Jun 14 04:14:58 CDT 2022
Michael Neuhauser has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18681 )
Change subject: res_pjsip: prune contacts on Asterisk start at a later time
......................................................................
res_pjsip: prune contacts on Asterisk start at a later time
Move the call to ast_sip_location_prune_boot_contacts() *after* the call to
ast_res_pjsip_init_options_handling() so that res/res_pjsip/pjsip_options.c is
informed about the contact deletion and updates its sip_options_contact_statuses
list. This allows for an AMI event to be sent by res/res_pjsip/pjsip_options.c
if the endpoint registers again from the same remote address and port (i.e.,
same URI) as used before the Asterisk restart.
ASTERISK-30109
Reported-by: Michael Neuhauser
Change-Id: I1ba4478019e4931a7085f62708d9b66837e901a8
---
M res/res_pjsip.c
M res/res_pjsip/pjsip_configuration.c
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/81/18681/1
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 1e41360..6d0766c 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -2653,6 +2653,8 @@
goto error;
}
+ ast_sip_location_prune_boot_contacts();
+
if (ast_res_pjsip_init_message_filter()) {
ast_log(LOG_ERROR, "Failed to initialize message IP updating. Aborting load\n");
goto error;
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 1bde576..8332cd7 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -2062,8 +2062,6 @@
load_all_endpoints();
- ast_sip_location_prune_boot_contacts();
-
acl_change_sub = stasis_subscribe(ast_security_topic(), acl_change_stasis_cb, NULL);
stasis_subscription_accept_message_type(acl_change_sub, ast_named_acl_change_type());
stasis_subscription_set_filter(acl_change_sub, STASIS_SUBSCRIPTION_FILTER_SELECTIVE);
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18681
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I1ba4478019e4931a7085f62708d9b66837e901a8
Gerrit-Change-Number: 18681
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Neuhauser <mike at firmix.at>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220614/9abe10a4/attachment.html>
More information about the asterisk-code-review
mailing list