<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13228">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_outbound_registration: add support for SRV failover<br><br>ASTERISK-28624<br><br>Change-Id: I8da7c300dd985ab7b10dbd5194aff2f737808561<br>---<br>M res/res_pjsip_outbound_registration.c<br>1 file changed, 11 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c</span><br><span>index fc52e9e..9ea6054 100644</span><br><span>--- a/res/res_pjsip_outbound_registration.c</span><br><span>+++ b/res/res_pjsip_outbound_registration.c</span><br><span>@@ -910,7 +910,17 @@</span><br><span> ast_debug(1, "Processing REGISTER response %d from server '%s' for client '%s'\n",</span><br><span> response->code, server_uri, client_uri);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if ((response->code == 401 || response->code == 407)</span><br><span style="color: hsl(120, 100%, 40%);">+ if (response->code == 408 || response->code == 503) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((ast_sip_failover_request(response->old_request))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ int res = registration_client_send(response->client_state, response->old_request);</span><br><span style="color: hsl(120, 100%, 40%);">+ /* The tdata ref was stolen */</span><br><span style="color: hsl(120, 100%, 40%);">+ response->old_request = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (res == PJ_SUCCESS) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_ref(response, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if ((response->code == 401 || response->code == 407)</span><br><span> && (!response->client_state->auth_attempted</span><br><span> || response->rdata->msg_info.cseq->cseq != response->client_state->auth_cseq)) {</span><br><span> int res;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13228">change 13228</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/+/13228"/><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: I8da7c300dd985ab7b10dbd5194aff2f737808561 </div>
<div style="display:none"> Gerrit-Change-Number: 13228 </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: Benjamin Keith Ford <bford@digium.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: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>