<div dir="ltr">ast_channel_exit_bridge?<div><br></div><div>Phil Mickelson</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 5, 2014 at 1:58 PM, Matt Jordan <span dir="ltr"><<a href="mailto:reviewboard@asterisk.org" target="_blank">reviewboard@asterisk.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



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










<blockquote style="margin-left:1em;border-left:2px solid #d0d0d0;padding-left:10px">
 <p style="margin-top:0">On June 5th, 2014, 12:45 p.m. CDT, <b>Mark Michelson</b> wrote:</p>
 <blockquote style="margin-left:1em;border-left:2px solid #d0d0d0;padding-left:10px">
  



<table width="100%" border="0" bgcolor="white">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom:1px solid #c0c0c0;font-size:9pt;padding:4px 8px;text-align:left">
    <a href="https://reviewboard.asterisk.org/r/3585/diff/1/?file=59216#file59216line4300" style="color:black;font-weight:bold;text-decoration:underline" target="_blank">/branches/12/include/asterisk/channel.h</a>
    <span style="font-weight:normal">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color:#e4d9cb;padding:4px 8px;text-align:center">
  <tr>

   <td colspan="4"><pre style="font-size:8pt;line-height:140%;margin:0">struct ast_bridge *ast_channel_get_bridge(const struct ast_channel *chan);</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right:1px solid #c0c0c0" align="right"><font></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size:8pt;line-height:140%;margin:0"></pre></td>
    <th bgcolor="#b1ebb0" style="border-left:1px solid #c0c0c0;border-right:1px solid #c0c0c0" align="right"><font>4300</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size:8pt;line-height:140%;margin:0"><span>int</span> <span>ast_channel_is_leaving_bridge</span><span>(</span><span>struct</span> <span>ast_channel</span> <span>*</span><span>chan</span><span>);</span></pre>
</td>
  </tr>

 </tbody>

</table>

  <pre style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">It's a tough thing to do, but I'd like to see this function's name imply that channels that are being hung up do not count as "leaving the bridge".</pre>

 </blockquote>





</blockquote>
<pre style="margin-left:1em;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">The intent is for a function to test to see if a channel that would normally be "hung up" (ast_check_hangup would return true) just wants out of a bridge, and is not actually "hung up".

Our dual purposing of soft hangup flags was a really bad idea.

Names I've thought of, besides this one:
 - ast_channel_wants_out_of_bridge
 - ast_channel_check_hangup_but_not_really_hungup
 - ast_channel_will_survive_this_operation

(Kidding, of course)

Can you think of anything else to call this?</pre>
<br>




<p>- Matt</p>


<br>
<p>On June 4th, 2014, 11:43 a.m. CDT, Matt Jordan 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-repeat:repeat-x;border:1px black solid">

 <tbody><tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Matt Jordan.</div>


<p style="color:grey"><i>Updated June 4, 2014, 11:43 a.m.</i></p>









<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">
 <tbody><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 patch is a re-do of review 3535.

When review request 3535 was merged, a major problem with it was uncovered. UNBRIDGE soft hangup flags have a catastrophic effect on the pbx core if they leak out from the bridge layer: the channel gets hung up. With the number of threads involved in a blind transfer, and with the initial patch, it was likely that this would occur. This caused a large number of test failures

This patch is nearly identical with the one proposed in review 3535, save for the following changes:
 - We explicitly clear the UNBRIDGE flag when setting an after goto on a channel in a bridge
 - Defensively, if we encounter an UNBRIDGE flag in the pbx core, we handle it</pre>
  </td>
 </tr>
</tbody></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">
 <tbody><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">The blind transfer tests for PJSIP now pass (fingers crossed). See review 3586.</pre>

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


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

 <li>/branches/12/main/pbx.c <span style="color:grey">(414996)</span></li>

 <li>/branches/12/main/framehook.c <span style="color:grey">(414996)</span></li>

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

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

 <li>/branches/12/main/bridge_after.c <span style="color:grey">(414996)</span></li>

 <li>/branches/12/include/asterisk/channel.h <span style="color:grey">(414996)</span></li>

 <li>/branches/12/bridges/bridge_native_rtp.c <span style="color:grey">(414996)</span></li>

</ul>

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







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








  </div>
 </div>


<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div>