<p> Attention is currently required from: N A, Joshua Colp, Sarah Autumn. </p>
<p>Patch set 5:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16080">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 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/e4184fb6_3be07bfe">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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I sort of get where this is going but I think I'm missing where the second part would go instead...</p></blockquote><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Replace the external_sleep function with this updated implementation...<br>static int mysleep(struct ast_channel *chan, int ms, int is_external)<br>{<br> return is_external ? usleep(ms * 1000) : ast_safe_sleep(chan, ms);<br>}</pre><p style="white-space: pre-wrap; word-wrap: break-word;">Then see below...</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/675e55f3_b129b985">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;">Additionally, before we go too far along here, it's on my list to add a Dial option that would send  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'd cross that bridge when you come to it. 😊</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/9bcee25f_79cca154">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 style="white-space: pre-wrap; word-wrap: break-word;">Need to remove.</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/904b6a32_6551bfb2">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 style="white-space: pre-wrap; word-wrap: break-word;">Older code doesn't do this but we now require if statements to always use {}.</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/ceae4465_14783826">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 style="white-space: pre-wrap; word-wrap: break-word;">Replace with mysleep(chan, duration, is_external);</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/5d4b3d7b_78a2fa2c">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 style="white-space: pre-wrap; word-wrap: break-word;">remove</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/cd8bb57b_93667a44">Patch Set #5, Line 224:</a> <code style="font-family:monospace,monospace">res = my_sleep(chan, between);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">replace with res = mysleep(chan, between, is_external);</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/5d8f199a_425e9f0a">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 style="white-space: pre-wrap; word-wrap: break-word;">Isn't this going to override the overrides for '*' and '#'?</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: 5 </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: N A <mail@interlinked.x10host.com> </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-Comment-Date: Fri, 06 Aug 2021 14:17:08 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </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>