<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7483">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip_options: dynamic contact's fields not updated on reload<br><br>Dynamic contacts were not being properly updated on reload. As a matter of<br>fact any changes to the AOR that a dynamic contact was associated with were<br>not being applied.<br><br>On reload, this patch makes it so for each dynamic contact, the associated<br>AOR is now retrieved and the AOR's fields are applied to the contact.<br><br>ASTERISK-27467<br><br>Change-Id: I8e3165dc6a745218c1c9db837f77fafa0516985d<br>---<br>M res/res_pjsip/pjsip_options.c<br>1 file changed, 18 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c<br>index d4ea911..da95341 100644<br>--- a/res/res_pjsip/pjsip_options.c<br>+++ b/res/res_pjsip/pjsip_options.c<br>@@ -1157,7 +1157,24 @@<br> <br> static int qualify_and_schedule_cb_without_aor(void *obj, void *arg, int flags)<br> {<br>-       qualify_and_schedule_contact((struct ast_sip_contact *) obj);<br>+        /*<br>+    * These are really dynamic contacts. We need to retrieve the aor associated<br>+  * with the contact since it's possible some of the aor's fields were updated<br>+         * since last load.<br>+   */<br>+  struct ast_sip_contact *contact = obj;<br>+       struct ast_sip_aor *aor = ast_sip_location_retrieve_aor(contact->aor);<br>+<br>+ if (aor) {<br>+           qualify_and_schedule_cb_with_aor(obj, aor, flags);<br>+           ao2_ref(aor, -1);<br>+    } else {<br>+             ast_log(LOG_WARNING, "Unable to locate AOR for contact '%s'. Keeping old "<br>+                 "associated settings: frequency=%d, timeout=%f, authenticate=%s\n",<br>+                        contact->uri, contact->qualify_frequency, contact->qualify_timeout,<br>+                 contact->authenticate_qualify ? "yes" : "no");<br>+                qualify_and_schedule_contact(contact);<br>+       }<br> <br>  return 0;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7483">change 7483</a>. To unsubscribe, 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/7483"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/13.18 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I8e3165dc6a745218c1c9db837f77fafa0516985d </div>
<div style="display:none"> Gerrit-Change-Number: 7483 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>