<p>Richard Mudgett <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/6197">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: Remove ephemeral registered contacts on transport shutdown.<br><br>The fix for the issue is broken up into three parts.<br><br>This is part two which handles the server side of REGISTER requests when<br>rewrite_contact is enabled.  Any registered reliable transport contact<br>becomes invalid when the transport connection becomes disconnected.<br><br>* Monitor the rewrite_contact's reliable transport REGISTER contact for<br>shutdown.  If it is shutdown then the contact must be removed because it<br>is no longer valid.  Otherwise, when the client attempts to re-REGISTER it<br>may be blocked because the invalid contact is there.  Also if we try to<br>send a call to the endpoint using the invalid contact then the endpoint is<br>not likely to see the request.  The endpoint either won't be listening on<br>that port for new connections or a NAT/firewall will block it.<br><br>* Prune any rewrite_contact's registered reliable transport contacts on<br>boot.  The reliable transport no longer exists so the contact is invalid.<br><br>* Websockets always rewrite the REGISTER contact address and the transport<br>needs to be monitored for shutdown.<br><br>* Made the websocket transport set a unique name since that is what we use<br>as the ao2 container key.  Otherwise, we would not know which transport we<br>find when one of them shuts down.  The names are also used for PJPROJECT<br>debug logging.<br><br>* Made the websocket transport post the PJSIP_TP_STATE_CONNECTED state<br>event.  Now the global keep_alive_interval option, initially idle shutdown<br>timer, and the server REGISTER contact monitor can work on wetsocket<br>transports.<br><br>* Made the websocket transport set the PJSIP_TP_DIR_INCOMING direction.<br>Now initially idle websockets will automatically shutdown.<br><br>ASTERISK-27147<br><br>Change-Id: I397a5e7d18476830f7ffe1726adf9ee6c15964f4<br>---<br>A contrib/ast-db-manage/config/versions/f3d1c5d38b56_add_prune_on_boot.py<br>M include/asterisk/res_pjsip.h<br>M res/res_pjsip.c<br>M res/res_pjsip/location.c<br>M res/res_pjsip/pjsip_configuration.c<br>M res/res_pjsip_registrar.c<br>M res/res_pjsip_transport_websocket.c<br>7 files changed, 250 insertions(+), 17 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/6197/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/6197">change 6197</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/6197"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I397a5e7d18476830f7ffe1726adf9ee6c15964f4 </div>
<div style="display:none"> Gerrit-Change-Number: 6197 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>