<p> Attention is currently required from: Joshua Colp, Sarah Autumn, George Joseph. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16080">View Change</a></p><p>11 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">Patchset:</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/+/16080?tab=comments">Patch Set #6:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Oh man. We'd really prefer you NOT add functionality to reviews this late. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Sorry about that, it seemed like it might make sense to combine some things into one module.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Here is the old code with the changes indicated, though I do plan to do as you said and submit another review to refactor and add other components. The following will be added in a future review, as a heads up:</p><ul><li>refactor the actual sending functions into app.c and channel.c so they are publicly callable</li><li>add MF digit sending to Dial D option</li><li>add ReceiveMF application</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">ReceiveSF and SendSF may also be added, but that depends on another review which I have yet to push as a dependency so that part may be delayed some while.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File apps/app_sendmf.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/+/16080/comment/0f97d836_167e29f2">Patch Set #4, Line 191:</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;">static int external_sleep(struct ast_channel *chan, int ms)<br>{<br> usleep(ms * 1000);<br> return 0;<br>}<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">> I sort of get where this is going but I think I'm missing where the second part would go instead.. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16080/comment/7287f70d_63b80bb5">Patch Set #4, Line 257:</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;">static int mf_stream_digits(struct ast_channel *chan, struct ast_channel *peer, const char *digits, int between, unsigned int duration, unsigned int durationkp, unsigned int durationst)<br>{<br> int res;<br><br> if (peer && ast_autoservice_start(peer)) {<br> return -1;<br> }<br> res = mf_stream(chan, digits, between, duration, durationkp, durationst, 0);<br> if (peer && ast_autoservice_stop(peer)) {<br> res = -1;<br> }<br><br> return res;<br>}<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">By "on my list", I am working on that right now, actively writing code for it. […]</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/+/16080/comment/28b24240_e9465c80">Patch Set #4, Line 257:</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;">static int mf_stream_digits(struct ast_channel *chan, struct ast_channel *peer, const char *digits, int between, unsigned int duration, unsigned int durationkp, unsigned int durationst)<br>{<br> int res;<br><br> if (peer && ast_autoservice_start(peer)) {<br> return -1;<br> }<br> res = mf_stream(chan, digits, between, duration, durationkp, durationst, 0);<br> if (peer && ast_autoservice_stop(peer)) {<br> res = -1;<br> }<br><br> return res;<br>}<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">By "on my list", I am working on that right now, actively writing code for it. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File apps/app_sendmf.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/+/16080/comment/c22c5d14_b98d2490">Patch Set #5, Line 91:</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;"> <parameter name="Receive" required="false"><br> <para>Emulate receiving MF on this channel instead of sending it out.</para><br> </parameter><br><br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Need to remove.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16080/comment/bbadb668_3c554c92">Patch Set #5, Line 129:</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 (digit >= '0' && digit <='9')<br> ast_playtones_start(chan, 0, mf_tones[digit-'0'], 0);<br> else if (digit == '*')<br> ast_playtones_start(chan, 0, mf_tones[10], 0);<br> else if (digit == '#')<br> ast_playtones_start(chan, 0, mf_tones[11], 0);<br> else if (digit == 'A')<br> ast_playtones_start(chan, 0, mf_tones[12], 0);<br> else if (digit == 'B')<br> ast_playtones_start(chan, 0, mf_tones[13], 0);<br> else if (digit == 'C')<br> ast_playtones_start(chan, 0, mf_tones[14], 0);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Older code doesn't do this but we now require if statements to always use {}.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16080/comment/cfa40272_fdb10ffb">Patch Set #5, Line 176:</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 (is_external)<br> usleep(duration * 1000);<br> else<br> ast_safe_sleep(chan, duration);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Replace with mysleep(chan, duration, is_external);</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16080/comment/7cd44619_0c745234">Patch Set #5, Line 190:</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;"> int (*my_sleep)(struct ast_channel *chan, int ms);<br><br> if (is_external) {<br> my_sleep = external_sleep;<br> } else {<br> my_sleep = ast_safe_sleep;<br> }<br><br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">remove</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16080/comment/223113f0_08bf899a">Patch Set #5, Line 224:</a> <code style="font-family:monospace,monospace">res = my_sleep(chan, between);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">replace with res = mysleep(chan, between, is_external);</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16080/comment/d31b274e_eec3660b">Patch Set #5, Line 335:</a> <code style="font-family:monospace,monospace">!ast_strlen_zero(duration) && (sscanf(duration, "%30u", &duration_ms) != 1</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yes, wouldn't that be the right way, since we are expecting the user to pass in the right duration f […]</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/+/16080/comment/dfe6952e_01791bdd">Patch Set #5, Line 335:</a> <code style="font-family:monospace,monospace">!ast_strlen_zero(duration) && (sscanf(duration, "%30u", &duration_ms) != 1</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yes, wouldn't that be the right way, since we are expecting the user to pass in the right duration f […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16080">change 16080</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/+/16080"/><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: I5d89afdbccee3f86cc702ed96d882f3d351327a4 </div>
<div style="display:none"> Gerrit-Change-Number: 16080 </div>
<div style="display:none"> Gerrit-PatchSet: 8 </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-CC: Sarah Autumn <sarah@endlesstemple.org> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: Sarah Autumn <sarah@endlesstemple.org> </div>
<div style="display:none"> Gerrit-Attention: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 08 Aug 2021 20:17:49 +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: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Comment-In-Reply-To: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>