<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/3046/">https://reviewboard.asterisk.org/r/3046/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On December 9th, 2013, 8:02 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;">The loop situation Matt described is possible.
When ast_channel_suppress() is called, it results in AST_FRAME_VOICE being turned into AST_FRAME_NULL.
If there is a jitter buffer on a channel, then AST_FRAME_NULL gets turned into AST_FRAME_VOICE.
While I don't think this will loop infinitely, it may result in the jitter buffer being depleted.</pre>
</blockquote>
<p>On December 10th, 2013, 2:20 a.m. UTC, <b>Matt Jordan</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;">Well, nuts. A framehook that mutes a channel and a jitter buffer would certainly be interesting.
Josh and I had talked a bit about this in #asterisk-dev. While we need to prevent framehooks from getting stuck in a loop, we also will need to avoid undo processing here.
I wonder if all framehooks really need to be treated in this fashion. Jitter buffers certainly don't want to be called multiple times - they've already returned a frame that was in the next slot and/or interpolated a frame. Maybe only certain framehooks should be called again if a frame they previously passed on is transformed.</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;">I don't think you can really group that into certain types of frames, it's really up to the previous framehooks whether they need to be called again or not.</pre>
<br />
<p>- Joshua</p>
<br />
<p>On December 9th, 2013, 1:27 a.m. UTC, Joshua Colp 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 Joshua Colp.</div>
<p style="color: grey;"><i>Updated Dec. 9, 2013, 1:27 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">
<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;">Currently when a frame is changed by a frame hook previous hooks aren't aware of it. This can be a problem when a previous hook reacts to the types of frames that a subsequent hook produces. An example of this would be the fax gateway hook and the PJSIP T.38 hook. Since the fax gateway hook injects T.38 control frames after the T.38 hook, nothing happens.
The attached change makes it so if a frame hook produces a different frame the hook iteration loop is restarted, skipping the hook that has produced the frame.</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;">Ran fax tests, confirmed fixed.</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/12/main/framehook.c <span style="color: grey">(403448)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3046/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>