<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6095">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve; Verified
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: Add announce-position-only-up option<br><br>Setting this option will cause the Queue application to only announce<br>the caller's position if it has improved since the last time that we<br>announced it.<br><br>Change-Id: I173a124121422209485b043e2bf784f54242fce6<br>---<br>M CHANGES<br>M apps/app_queue.c<br>M configs/samples/queues.conf.sample<br>3 files changed, 19 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/CHANGES b/CHANGES<br>index 5daa816..462018b 100644<br>--- a/CHANGES<br>+++ b/CHANGES<br>@@ -17,6 +17,11 @@<br>  * PAUSEALL/UNPAUSEALL now sets the pause reason in the queue_log if it has<br>    been defined.<br> <br>+ * A new option, "announce-position-only-up," has been added that, when set to<br>+   yes, causes position announcements to only be played when the caller's<br>+   queue position has improved since the last time that we annouced their<br>+   position. This default is no.<br>+<br> ------------------------------------------------------------------------------<br> --- Functionality changes from Asterisk 14.6.0 to Asterisk 14.7.0 ------------<br> ------------------------------------------------------------------------------<br>diff --git a/apps/app_queue.c b/apps/app_queue.c<br>index 762119e..f297dad 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -1683,6 +1683,7 @@<br>     unsigned int timeoutrestart:1;<br>        unsigned int announceholdtime:2;<br>      unsigned int announceposition:3;<br>+     unsigned int announceposition_only_up:1; /*!< Only announce position if it has improved */<br>         int strategy:4;<br>       unsigned int realtime:1;<br>      unsigned int found:1;<br>@@ -2722,6 +2723,7 @@<br>  q->announcefrequency = 0;<br>  q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;<br>  q->announceholdtime = 1;<br>+  q->announceposition_only_up = 0;<br>   q->announcepositionlimit = 10; /* Default 10 positions */<br>  q->announceposition = ANNOUNCEPOSITION_YES; /* Default yes */<br>      q->roundingseconds = 0; /* Default - don't announce seconds */<br>@@ -3171,6 +3173,8 @@<br>          } else {<br>                      q->announceposition = ANNOUNCEPOSITION_NO;<br>                 }<br>+    } else if (!strcasecmp(param, "announce-position-only-up")) {<br>+              q->announceposition_only_up = ast_true(val);<br>       } else if (!strcasecmp(param, "announce-position-limit")) {<br>                 q->announcepositionlimit = atoi(val);<br>      } else if (!strcasecmp(param, "periodic-announce")) {<br>@@ -3911,6 +3915,11 @@<br>               return 0;<br>     }<br> <br>+ /* Only announce if the caller's queue position has improved since last time */<br>+  if (qe->parent->announceposition_only_up && qe->last_pos_said <= qe->pos) {<br>+           return 0;<br>+    }<br>+<br>  if (ringing) {<br>                ast_indicate(qe->chan,-1);<br>         } else {<br>diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample<br>index b34a8d8..3e7cbd8 100644<br>--- a/configs/samples/queues.conf.sample<br>+++ b/configs/samples/queues.conf.sample<br>@@ -345,6 +345,11 @@<br> ;<br> ; announce-round-seconds = 10<br> ;<br>+; Only announce the caller's position if it has improved since the last announcement.<br>+; The default value is no.<br>+;<br>+; announce-position-only-up = yes<br>+;<br> ; Use these sound files in making position/holdtime announcements.  The<br> ; defaults are as listed below -- change only if you need to.<br> ;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6095">change 6095</a>. To unsubscribe, 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/6095"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I173a124121422209485b043e2bf784f54242fce6 </div>
<div style="display:none"> Gerrit-Change-Number: 6095 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Rodrigo Ramirez Norambuena <a@rodrigoramirez.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>