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




<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.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Mark Michelson.</div>








<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-22039">ASTERISK-22039</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;">This gets rid of all calls to ast_bridged_channel() in Asterisk.

There are some cases where a completely different approach could likely be taken. However, the uses of the function are in not wrong, per se. So I took one of two approaches here:

* If the actual bridged channel was being used, then I replaced the function call with ast_channel_bridge_peer(). The potential tricky factor here is that this function locks the channel. I tried to be sure that this was safe in all cases, but having another set of eyes double-check would be good.
* If the function was being called just to see if a channel was in a bridge, I replaced the function call with ast_channel_is_bridged().</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;">Asterisk compiles and basic calls work perfectly fine.</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>/trunk/apps/app_chanspy.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_dahdi.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_iax2.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_mgcp.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_misdn.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_oss.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_sip.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/chan_skinny.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/channels/sig_analog.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/funcs/func_channel.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/include/asterisk/channel.h <span style="color: grey">(395825)</span></li>

 <li>/trunk/main/channel.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/main/channel_internal_api.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/main/features.c <span style="color: grey">(395825)</span></li>

 <li>/trunk/main/rtp_engine.c <span style="color: grey">(395825)</span></li>

</ul>

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







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




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