<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14758">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: 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_diversion: handle 181<br><br>Adapt the response handler so it also called when 181 is received.<br>In the case 181 is received, also generate the 181 response.<br><br>ASTERISK-29001 #close<br><br>Change-Id: I73cfee46a8ca85371280ebdb38674f8fde7510df<br>---<br>M res/res_pjsip_diversion.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_diversion.c b/res/res_pjsip_diversion.c</span><br><span>index 96a9069..3f74871 100644</span><br><span>--- a/res/res_pjsip_diversion.c</span><br><span>+++ b/res/res_pjsip_diversion.c</span><br><span>@@ -259,6 +259,10 @@</span><br><span>      ++data.count;</span><br><span> </span><br><span>    ast_channel_set_redirecting(session->channel, &data, &update);</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Only queue an indication if it was due to a response */</span><br><span style="color: hsl(120, 100%, 40%);">+    if (session->inv_session->role == PJSIP_ROLE_UAC) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_channel_queue_redirecting_update(session->channel, &data, &update);</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span>    ast_party_redirecting_free(&data);</span><br><span> }</span><br><span> </span><br><span>@@ -406,7 +410,7 @@</span><br><span>        .incoming_response = diversion_incoming_response,</span><br><span>    .outgoing_request = diversion_outgoing_request,</span><br><span>      .outgoing_response = diversion_outgoing_response,</span><br><span style="color: hsl(0, 100%, 40%);">-       .response_priority = AST_SIP_SESSION_BEFORE_REDIRECTING,</span><br><span style="color: hsl(120, 100%, 40%);">+      .response_priority = AST_SIP_SESSION_BEFORE_REDIRECTING|AST_SIP_SESSION_BEFORE_MEDIA,</span><br><span> };</span><br><span> </span><br><span> static int load_module(void)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14758">change 14758</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/+/14758"/><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: I73cfee46a8ca85371280ebdb38674f8fde7510df </div>
<div style="display:none"> Gerrit-Change-Number: 14758 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.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@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>