<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/1420/">https://reviewboard.asterisk.org/r/1420/</a>
     </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By schmidts.</div>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function. To add the reason header to a sip cancel message of the picked up channel.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">tested with a Cisco SPA525g2 and sip debug.
Confirmed by Black187

    -- Executing [123@testpickup:2] Dial(&quot;SIP/test&quot;, &quot;SIP/xxx@yyy,120&quot;) in new stack
...
    -- Executing [999@testpickup:1] NoOp(&quot;SIP/test&quot;, &quot;starting pickup&quot;) in new stack
    -- Executing [999@testpickup:2] PickupChan(&quot;SIP/test&quot;, &quot;SIP/yyy&quot;) in new stack
trying to set FLAG on SIP/yyy
Scheduling destruction of SIP dialog &#39;631f2bcd31cb6a8b039a4f9c73f110ef@test:5060&#39; in 32000 ms (Method: INVITE)
Reliably Transmitting (NAT) to yyy:5060:
CANCEL sip:xxx@yyy SIP/2.0
Via: SIP/2.0/UDP test:5060;branch=z9hG4bK7838248f;rport
Max-Forwards: 70
From: &quot;&quot; &lt;sip:test@test&gt;;tag=as19dc5c35
To: &lt;sip:xxx@yyy0&gt;
Call-ID: 631f2bcd31cb6a8b039a4f9c73f110ef@test:5060
CSeq: 102 CANCEL
User-Agent: silver.sip
Reason: SIP;cause=200;text=&quot;Call completed elsewhere&quot;
Content-Length: 0</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>branches/1.8/main/features.c <span style="color: grey">(334680)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/1420/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>




  </div>
 </body>
</html>