<p> Attention is currently required from: Joshua Colp, George Joseph. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16226">View Change</a></p><p>14 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/+/16226?tab=comments">Patch Set #7:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">> Looks like I just forgot to update the XML documentation. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File doc/CHANGES-staging/say.txt:</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/+/16226/comment/e910a44a_4410d4b3">Patch Set #8, Line 3:</a> <code style="font-family:monospace,monospace">function to </code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">function "SAYFILES" to</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File funcs/func_sayfiles.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/+/16226/comment/eb34e9f9_0c846f28">Patch Set #8, Line 64:</a> <code style="font-family:monospace,monospace">Files played by SayNumber()</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Files played by SayNumber().  Currently supported for English only.</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/+/16226/comment/38b4d8b4_6a6e5a6a">Patch Set #8, Line 67:</a> <code style="font-family:monospace,monospace">SayMoney()</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">It's in say.c.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Whoops, looks like a whole file was missing from this review... my bad.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16226/comment/9da94042_77ab6671">Patch Set #8, Line 82:</a> <code style="font-family:monospace,monospace"><ref type="application">SayMoney</ref></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Remove the "money" stuff from this review and put it and the SayMoney() application in a new review.</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/+/16226/comment/441552ae_74497153">Patch Set #8, Line 148:</a> <code style="font-family:monospace,monospace">#ifdef TEST_FRAMEWORK</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">points for the unit test. […]</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 include/asterisk/say.h:</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/+/16226/comment/2e60adf4_f1c73120">Patch Set #8, Line 146:</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;"> * function to pronounce monetary amounts<br> */<br>int ast_say_money_str(struct ast_channel *chan, const char *num,<br>      const char *ints, const char *lang);<br><br>SAY_EXTERN int (* ast_say_money_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_money_str_full);<br><br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I'm a bit confused, what's incomplete about the SayMoney app currently? Or just shouldn't be here?</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/+/16226/comment/38a5ea29_9bd06a17">Patch Set #8, Line 206:</a> <code style="font-family:monospace,monospace">_full</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">You can remove the _full from the "get" functions. […]</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/+/16226/comment/01998425_8c8bd7dd">Patch Set #8, Line 232:</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;">/*!<br> * \brief Returns an ast_str of files for SayMoney playback.<br> *<br> * \param str Text to be translated to the corresponding audio files.<br> * \param lang Channel language<br> *<br> * Computes the list of files to be played by SayMoney.<br> *<br> * \retval ampersand-separated string of Asterisk sound files that can be played back.<br> */<br>struct ast_str* ast_get_money_str_full(const char *str, const char *lang);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">See above</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 main/say.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/+/16226/comment/0284094f_0367ed51">Patch Set #8, Line 63:</a> <code style="font-family:monospace,monospace">_full</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">As mentioned in the say.h, you can remove the _full from the "get" functions.</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/+/16226/comment/a6c7e362_8013e868">Patch Set #8, Line 363:</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;">struct ast_str* ast_get_money_str_full(const char *str, const char *lang)<br>{<br>  const char *fnr;<br><br>    double dollars = 0;<br>   int amt, cents;<br>       struct ast_str *fnrecurse;<br><br>  struct ast_str *filenames = ast_str_create(20);<br>       ast_str_reset(filenames);<br><br>   if (sscanf(str, "%30lf", &dollars) != 1) {<br>              amt = 0;<br>      } else { /* convert everything to cents */<br>            amt = dollars * 100;<br>  }<br><br>   /* Just the cents after the dollar decimal point */<br>   cents = amt - (((int) dollars) * 100);<br>        ast_debug(1, "Cents is %d, amount is %d\n", cents, amt);<br><br>  if (amt >= 100) {<br>          fnrecurse = ast_get_number_str_full((amt / 100), lang);<br>               fnr = ast_str_buffer(fnrecurse);<br>              ast_str_append(&filenames, 0, "%s", fnr);<br><br>             /* If this is it, end on a down pitch, otherwise up pitch */<br>          if (amt < 200) {<br>                   ast_str_append(&filenames, 0, "&%s", (cents > 0) ? "letters/dollar_" : "letters/dollar");<br>            } else {<br>                      ast_str_append(&filenames, 0, "&%s", "dollars");<br>          }<br><br>           /* If dollars and cents, add "and" in the middle */<br>         if (cents > 0) {<br>                   ast_str_append(&filenames, 0, "&%s", "and");<br>              }<br>     }<br><br>   if (cents > 0) {<br>           ast_debug(1, "Entered cents block\n");<br>              fnrecurse = ast_get_number_str_full(cents, lang);<br>             fnr = ast_str_buffer(fnrecurse);<br>              ast_str_append(&filenames, 0, (amt < 100 ? "%s" : "&%s"), fnr);<br>                ast_str_append(&filenames, 0, "&%s", (cents == 1) ? "cent" : "cents");<br>  } else if (amt == 0) {<br>                fnrecurse = ast_get_digit_str_full("0", lang);<br>              fnr = ast_str_buffer(fnrecurse);<br>              ast_str_append(&filenames, 0, "%s", fnr);<br>               ast_str_append(&filenames, 0, "&%s", "cents");<br>    }<br><br>   return filenames;<br>}<br><br>static int say_money_str_full(struct ast_channel *chan, const char *str, const char *ints, const char *lang, int audiofd, int ctrlfd)<br>{<br>      const char *fn;<br>       int res = 0;<br><br>        struct ast_str *filenames = ast_get_money_str_full(str, lang);<br>        char *files = ast_str_buffer(filenames);<br><br>    while ((fn = strsep(&files, "&"))) {<br>                res = ast_streamfile(chan, fn, lang);<br>         if (!res) {<br>                   if ((audiofd  > -1) && (ctrlfd > -1))<br>                           res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);<br>                       else<br>                          res = ast_waitstream(chan, ints);<br>             }<br>             ast_stopstream(chan);<br> }<br><br>   ast_free(filenames);<br><br>        return res;<br>}<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Remove money support for now and add it in another review that also has the SayMoney application.</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/+/16226/comment/87e2f7f4_83e9be4d">Patch Set #8, Line 442:</a> <code style="font-family:monospace,monospace">st_get_number_str_full</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Because the number functions are language-specific, you should make this a private function named ge […]</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/+/16226/comment/c2ef8d68_b120ca9b">Patch Set #8, Line 753:</a> <code style="font-family:monospace,monospace">ast_get_number_str_full</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">get_number_str_en</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/+/16226/comment/d6d01c86_5a229ce8">Patch Set #8, Line 9582:</a> <code style="font-family:monospace,monospace">        ast_say_money_str_full = say_money_str_full;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Remove for now.</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/+/16226">change 16226</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/+/16226"/><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: If9718c89353b8e153d84add3cc4637b79585db19 </div>
<div style="display:none"> Gerrit-Change-Number: 16226 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </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-CC: 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: Fri, 06 Aug 2021 17:43:21 +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>