<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/4166/">https://reviewboard.asterisk.org/r/4166/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 13th, 2014, 4:30 p.m. UTC, <b>Mark Michelson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">With the fix being made to the leaked bridge in Asterisk, is this change still required? Does hanging up self.channels[1] not result in self.channels[3] and the bridge being destroyed as expected?</pre>
</blockquote>
<p>On November 13th, 2014, 10:13 p.m. UTC, <b>Corey Farrell</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Still required, I'm guessing that when the first channel hangs up it leaves the second in a single user bridge. I'm not sure if this is a bug in Asterisk or just the way it works. The XMLDOC doesn't specify.</pre>
</blockquote>
<p>On November 13th, 2014, 10:42 p.m. UTC, <b>Corey Farrell</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Actually on further inspection it appears the bridge is destroyed, and the caller is sent back to the previous Dialplan location. core show channels without hangup of self.channels[3]:
Channel Location State Application(Data)
Local/waiting_area@d (None) Up Echo()
Local/waiting_area@d (None) Up Echo()
2 active channels
2 active calls
14 calls processed
If I then run 'channel request hangup Local/waiting_area@default-00000003;1' (or hangup ;2), the test finishes and passes leak free.
This is strange to me, why all the other channel pairs were hung up but not this one.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">There are a few of unique properties to the final bridge that, imo, shouldn't affect operations but in practice might:
1) The final bridge between 1 and 3 is the only one where the remaining channel in the bridge came from another bridge rather than directly from the dialplan. In fact, the remaining channel had been in two previous bridges, so its movement through the bridges may have something to do with it.
2) The final bridge between 1 and 3 is the only one where a channel is hung up. In the other cases, a channel is stolen from the bridge, resulting in bridge dissolution.
After looking at the code again in action_bridge in features.c, the channels that are bridged together have ast_bridge_set_after_go_on() set on them. Looking at the docs for ast_bridge_set_after_go_on(), it says "If parseable_goto, then use the given context/exten/priority as the relative position for the parseable goto. Else goto the given context/exten/priorit+1". We don't provide a parseable goto, so after becoming unbridged, the channels should move to the next priority in the dialplan after the one they're currently in. Since the channels being bridged are currently at the Echo() priority, they should be returned to the dialplan at the next priority, which is Hangup(). This happens with all but channel 3. Somehow, I'm guessing that some code path is causing the priority number to goto after the bridge to get screwed up, so it ends up back in Echo() instead of moving on to Hangup().
I think this is a problem in Asterisk, not the test.</pre>
<br />
<p>- Mark</p>
<br />
<p>On November 11th, 2014, 8:37 p.m. UTC, Corey Farrell 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 Corey Farrell.</div>
<p style="color: grey;"><i>Updated Nov. 11, 2014, 8:37 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
testsuite
</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;">self.channels[3] is not hung up, causing the Asterisk graceful shutdown to timeout. This causes the test to fail under REF_DEBUG mode and prevents coverage from seeing the code executed by this test.</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>/asterisk/trunk/tests/bridge/bridge_action/bridge_action.py <span style="color: grey">(5920)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/4166/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>