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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_registrar: Don't specify an expiration for static contacts.<br><br>Statically configured contacts on an AOR don't have an expiration<br>time so when adding them to the resulting 200 OK if an endpoint<br>registers ensure they are marked as such.<br><br>ASTERISK-28995<br><br>Change-Id: I9f0e45eb2ccdedc9a0df5358634a19ccab0ad596<br>---<br>M res/res_pjsip_registrar.c<br>1 file changed, 5 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c</span><br><span>index be40a20..44b59c1 100644</span><br><span>--- a/res/res_pjsip_registrar.c</span><br><span>+++ b/res/res_pjsip_registrar.c</span><br><span>@@ -233,7 +233,11 @@</span><br><span>  if (parsed && (PJSIP_URI_SCHEME_IS_SIP(parsed) || PJSIP_URI_SCHEME_IS_SIPS(parsed))) {</span><br><span>               pjsip_contact_hdr *hdr = pjsip_contact_hdr_create(tdata->pool);</span><br><span>           hdr->uri = parsed;</span><br><span style="color: hsl(0, 100%, 40%);">-           hdr->expires = ast_tvdiff_ms(contact->expiration_time, ast_tvnow()) / 1000;</span><br><span style="color: hsl(120, 100%, 40%);">+             if (!ast_tvzero(contact->expiration_time)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       hdr->expires = ast_tvdiff_ms(contact->expiration_time, ast_tvnow()) / 1000;</span><br><span style="color: hsl(120, 100%, 40%);">+             } else {</span><br><span style="color: hsl(120, 100%, 40%);">+                      hdr->expires = PJSIP_EXPIRES_NOT_SPECIFIED;</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span>            pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *) hdr);</span><br><span>         } else {</span><br><span>             ast_log(LOG_WARNING, "Skipping invalid Contact URI \"%.*s\" for AOR %s\n",</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14706">change 14706</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/+/14706"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I9f0e45eb2ccdedc9a0df5358634a19ccab0ad596 </div>
<div style="display:none"> Gerrit-Change-Number: 14706 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>