<p> Attention is currently required from: Joshua Colp, George Joseph. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16071">View Change</a></p><p>8 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File funcs/func_framedrop.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/bb592f3b_59762def">Patch Set #2, Line 1:</a> <code style="font-family:monospace,monospace">/*</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The source file name should probably be func_frame_drop. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/d6c3163f_dd73e322">Patch Set #2, Line 42:</a> <code style="font-family:monospace,monospace">Intercepts specified frames on a channel instead of passing them on.</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">"Drops specific frame types in the <literal>TX</literal> or <literal>RX</literal> direction on a cha […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/c0fe6023_5e18e8ba">Patch Set #2, Line 46:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">A filter can be applied to the trace to limit what frames are suppressed. This<br>                            filter can be a <literal>TX</literal> or <literal>RX</literal> list of frame types<br>                            and control frame types.<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">How about... "List of frame types to be dropped for the specified direction. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/5f66e53b_4f7f9091">Patch Set #2, Line 67:</a> <code style="font-family:monospace,monospace">                                        <enum name = "HANGUP" /></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I am not comfortable with this list of CONTROL frames. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Are there any others you had in mind besides hangup?<br>My main use cases are dropping DTMF, flash, and answer frames, but I wanted to leave other permissible options open. I'm not sure what else here would be considered a "no no".</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/2a81cb97_8d379b88">Patch Set #2, Line 124:</a> <code style="font-family:monospace,monospace">static struct {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The lists are a little fragile since someone could add a new frametype and forget to update these li […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/d7cfc9c8_060ce31c">Patch Set #2, Line 195:</a> <code style="font-family:monospace,monospace">int list_type; /* 0 = TX, 1 = RX */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Can you make this an enum?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Are you referring to list_type or values here? I don't see a red line in the excerpt.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/8c378c4a_5c4ad6d0">Patch Set #2, Line 278:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> for (i = 0; i < ARRAY_LEN(frametype2str); i++) {<br>           if (strcasestr(value, frametype2str[i].str)) {<br>                        framedata->values[i] = 1;<br>          }<br>     }<br><br>   for (i = 0; i < ARRAY_LEN(controlframetype2str); i++) {<br>            if (strcasestr(value, controlframetype2str[i].str)) {<br>                 framedata->controlvalues[i] = 1;<br>           }<br>     }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I think these are going to be an issue because if a user specified "TEXT_DATA", both "TEXT" and "TEX […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Whoops, didn't notice that before. What about strcasecmp instead of strcasestr?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/b9e8be0e_8e972abf">Patch Set #2, Line 294:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">             if ((datastore = ast_channel_datastore_find(chan, &frame_drop_datastore, NULL))) {<br>                        id = datastore->data;<br>                      ast_framehook_detach(chan, *id);<br>                      ast_channel_datastore_remove(chan, datastore);<br>                        ast_datastore_free(datastore);<br>                }<br><br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">It'd probably be good to add a note to the XML documentation that subsequent calls to FRAME_DROP wil […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Added.<br>Also, something I noticed from testing is that the directions seem to work backwards from other functions. For instance, to prevent DTMF from registering in Asterisk from an endpoint, Set(FRAME_DROP(TX)=DTMF_END,DTMF_BEGIN) is the way that does it. This seems backwards to me at least - wondering if the TX/RX should be flipped around in the code so that it works the other way or if there should be a note about this.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16071">change 16071</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/16071"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8147c9d55d74e2e48861edba6b22f930920541ec </div>
<div style="display:none"> Gerrit-Change-Number: 16071 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 21 Jun 2021 13:18:04 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Comment-In-Reply-To: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>