<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/4034/">https://reviewboard.asterisk.org/r/4034/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
 <br />









<p>- Mark Michelson</p>


<br />
<p>On September 30th, 2014, 7:24 p.m. UTC, rmudgett wrote:</p>








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

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


<p style="color: grey;"><i>Updated Sept. 30, 2014, 7:24 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-24356">ASTERISK-24356</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</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;">Performing a directed call pickup resulted in a deadlock when PJSIP channels were involved.

A masquerade needs to hold onto the channel locks while it swaps channel information between
the two channels involved in the masquerade.  With PJSIP channels, the fixup routine needed
to push a fixup task onto the PJSIP channel's serializer.  Unfortunately, if the serializer
was also processing a task that needed to lock the channel, you get deadlock.

* Added a new control frame that is used to notify the channels that a
masquerade is about to start and when it has completed.

* Added the ability to query supported taskprocessors if the current thread is the
taskprocessor thread.

* Added the ability to suspend/unsuspend the PJSIP serializer thread so a masquerade could
fixup the PJSIP channel without using the serializer.</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;">* Performed several directed call pickups without deadlocking.  Before the patch, the system would usually deadlock.

* Performed a SIP attended transfer to an appliction.  The transfer still works.</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/13/res/res_pjsip_session.exports.in <span style="color: grey">(424175)</span></li>

 <li>/branches/13/res/res_pjsip_session.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/main/taskprocessor.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/main/core_unreal.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/main/channel.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/main/bridge_channel.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/include/asterisk/taskprocessor.h <span style="color: grey">(424175)</span></li>

 <li>/branches/13/include/asterisk/res_pjsip_session.h <span style="color: grey">(424175)</span></li>

 <li>/branches/13/include/asterisk/frame.h <span style="color: grey">(424175)</span></li>

 <li>/branches/13/funcs/func_frame_trace.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_unistim.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_skinny.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_sip.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_pjsip.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_motif.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_misdn.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/channels/chan_iax2.c <span style="color: grey">(424175)</span></li>

 <li>/branches/13/addons/chan_ooh323.c <span style="color: grey">(424175)</span></li>

</ul>

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







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








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