<p>Michael Neuhauser has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18681">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: prune contacts on Asterisk start at a later time<br><br>Move the call to ast_sip_location_prune_boot_contacts() *after* the call to<br>ast_res_pjsip_init_options_handling() so that res/res_pjsip/pjsip_options.c is<br>informed about the contact deletion and updates its sip_options_contact_statuses<br>list. This allows for an AMI event to be sent by res/res_pjsip/pjsip_options.c<br>if the endpoint registers again from the same remote address and port (i.e.,<br>same URI) as used before the Asterisk restart.<br><br>ASTERISK-30109<br>Reported-by: Michael Neuhauser<br><br>Change-Id: I1ba4478019e4931a7085f62708d9b66837e901a8<br>---<br>M res/res_pjsip.c<br>M res/res_pjsip/pjsip_configuration.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/81/18681/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip.c b/res/res_pjsip.c</span><br><span>index 1e41360..6d0766c 100644</span><br><span>--- a/res/res_pjsip.c</span><br><span>+++ b/res/res_pjsip.c</span><br><span>@@ -2653,6 +2653,8 @@</span><br><span>                goto error;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_location_prune_boot_contacts();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    if (ast_res_pjsip_init_message_filter()) {</span><br><span>           ast_log(LOG_ERROR, "Failed to initialize message IP updating. Aborting load\n");</span><br><span>           goto error;</span><br><span>diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c</span><br><span>index 1bde576..8332cd7 100644</span><br><span>--- a/res/res_pjsip/pjsip_configuration.c</span><br><span>+++ b/res/res_pjsip/pjsip_configuration.c</span><br><span>@@ -2062,8 +2062,6 @@</span><br><span> </span><br><span>     load_all_endpoints();</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       ast_sip_location_prune_boot_contacts();</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>      acl_change_sub = stasis_subscribe(ast_security_topic(), acl_change_stasis_cb, NULL);</span><br><span>         stasis_subscription_accept_message_type(acl_change_sub, ast_named_acl_change_type());</span><br><span>        stasis_subscription_set_filter(acl_change_sub, STASIS_SUBSCRIPTION_FILTER_SELECTIVE);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18681">change 18681</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18681"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I1ba4478019e4931a7085f62708d9b66837e901a8 </div>
<div style="display:none"> Gerrit-Change-Number: 18681 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Michael Neuhauser <mike@firmix.at> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>