<p>Torrey Searle has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14690">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_diversion: handle 181<br><br>Adapt arm the response handler so it can also receive 181.  In the<br>case 181 is received, also forward 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, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/90/14690/1</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..eca6ee9 100644</span><br><span>--- a/res/res_pjsip_diversion.c</span><br><span>+++ b/res/res_pjsip_diversion.c</span><br><span>@@ -297,6 +297,11 @@</span><br><span> </span><br><span>        set_redirecting(session, div_hdr, contact_hdr ? (pjsip_name_addr*)contact_hdr->uri :</span><br><span>                      (pjsip_name_addr*)PJSIP_MSG_FROM_HDR(rdata->msg_info.msg)->uri);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      if (status.code == 181) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_queue_control(session->channel, AST_CONTROL_REDIRECTING);</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> }</span><br><span> </span><br><span> /*!</span><br><span>@@ -406,7 +411,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/+/14690">change 14690</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/+/14690"/><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: I73cfee46a8ca85371280ebdb38674f8fde7510df </div>
<div style="display:none"> Gerrit-Change-Number: 14690 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>