<p>Mark Petersen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17781">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue.c: Queue don't play "thank-you" when here is no hold time announcements<br><br>if holdtime is (0 min, 0 sec) there is no hold time announcements<br>we should then also not playing queue-thankyou<br><br>ASTERISK-29831<br><br>Change-Id: Ic7e51dcde526b23f1cd8d24e1d1e2d81e10f9d2c<br>---<br>M apps/app_queue.c<br>A doc/CHANGES-staging/app_queue_say_thanks.txt<br>2 files changed, 8 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/81/17781/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_queue.c b/apps/app_queue.c</span><br><span>index dcd5aa8..399ee7b 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -4053,9 +4053,8 @@</span><br><span> </span><br><span> static int say_position(struct queue_ent *qe, int ringing)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        int res = 0, announceposition = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+    int res = 0, say_thanks = 0;</span><br><span>         long avgholdmins, avgholdsecs;</span><br><span style="color: hsl(0, 100%, 40%);">-  int say_thanks = 1;</span><br><span>  time_t now;</span><br><span> </span><br><span>      /* Let minannouncefrequency seconds pass between the start of each position announcement */</span><br><span>@@ -4084,11 +4083,7 @@</span><br><span>                 qe->parent->announceposition == ANNOUNCEPOSITION_MORE_THAN ||</span><br><span>          (qe->parent->announceposition == ANNOUNCEPOSITION_LIMIT &&</span><br><span>             qe->pos <= qe->parent->announcepositionlimit)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                    announceposition = 1;</span><br><span style="color: hsl(0, 100%, 40%);">-   }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       if (announceposition == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+          say_thanks = 1;</span><br><span>              /* Say we're next, if we are */</span><br><span>          if (qe->pos == 1) {</span><br><span>                       res = play_file(qe->chan, qe->parent->sound_next);</span><br><span>@@ -4132,6 +4127,7 @@</span><br><span>  if ((avgholdmins+avgholdsecs) > 0 && qe->parent->announceholdtime &&</span><br><span>                ((qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE && !qe->last_pos) ||</span><br><span>                !(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE))) {</span><br><span style="color: hsl(120, 100%, 40%);">+            say_thanks = 1;</span><br><span>              res = play_file(qe->chan, qe->parent->sound_holdtime);</span><br><span>              if (res) {</span><br><span>                   goto playout;</span><br><span>@@ -4166,8 +4162,6 @@</span><br><span>                                goto playout;</span><br><span>                        }</span><br><span>            }</span><br><span style="color: hsl(0, 100%, 40%);">-       } else if (qe->parent->announceholdtime && !qe->parent->announceposition) {</span><br><span style="color: hsl(0, 100%, 40%);">-         say_thanks = 0;</span><br><span>      }</span><br><span> </span><br><span> posout:</span><br><span>diff --git a/doc/CHANGES-staging/app_queue_say_thanks.txt b/doc/CHANGES-staging/app_queue_say_thanks.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..b8c0724</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/app_queue_say_thanks.txt</span><br><span>@@ -0,0 +1,5 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: app_queues</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: Applications</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Don't play sound_thanks if there is no leading hold_time message</span><br><span style="color: hsl(120, 100%, 40%);">+When the only announcement is hold time, and there is no hold time (0 min, 0 sec), asterisk will say "thank you for your patience"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17781">change 17781</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/+/17781"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Ic7e51dcde526b23f1cd8d24e1d1e2d81e10f9d2c </div>
<div style="display:none"> Gerrit-Change-Number: 17781 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Mark Petersen <bugs.digium.com@zombie.dk> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>