<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/1397/">https://reviewboard.asterisk.org/r/1397/</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 irroot.</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;">A sip phone tries to pickup a call but for some reason looses the pvt this causes all sorts of mischief.

Im proposing that sip_hangup return -1 when there is no private it has failed what it should be doing.
if the hangup fails ast_do_masquerade will kill the channel and return not leaving the channel orphaned.

[Aug 26 10:50:21] NOTICE[29961] app_directed_pickup.c: pickup SIP/2201-0000167c attempt by SIP/2225-0000168c
[Aug 26 10:50:22] WARNING[29961] chan_sip.c: No SIP tech_pvt! Fixup of SIP/2225-0000168c failed.
[Aug 26 10:50:22] WARNING[29961] channel.c: Fixup failed on channel SIP/2225-0000168c&lt;MASQ&gt;, strange things may happen.
[Aug 26 10:51:23] NOTICE[21093] chan_sip.c: Disconnecting call &#39;SIP/2225-0000168c&#39; for lack of RTP activity in 61 seconds
</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>/team/irroot/distrotech-customers-1.8/channels/chan_sip.c <span style="color: grey">(333499)</span></li>

 <li>/team/irroot/distrotech-customers-1.8/main/channel.c <span style="color: grey">(333499)</span></li>

 <li>/team/irroot/distrotech-customers-1.8/main/features.c <span style="color: grey">(333499)</span></li>

</ul>

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




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




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