<p>Rodrigo Ramirez Norambuena has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/5880">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add feature set announce-position-only-up for caller list<br><br>Change-Id: I173a124121422209485b043e2bf784f54242fce6<br>---<br>M apps/app_queue.c<br>M configs/samples/queues.conf.sample<br>2 files changed, 14 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/80/5880/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_queue.c b/apps/app_queue.c<br>index ae2d645..7731e70 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -1669,6 +1669,7 @@<br>      unsigned int timeoutrestart:1;<br>        unsigned int announceholdtime:2;<br>      unsigned int announceposition:3;<br>+     unsigned int announcepositiononlyup:1; /* Say position if only the change if up not down on caller positions*/<br>        int strategy:4;<br>       unsigned int realtime:1;<br>      unsigned int found:1;<br>@@ -3124,6 +3125,8 @@<br>          } else {<br>                      q->announceposition = ANNOUNCEPOSITION_NO;<br>                 }<br>+    } else if (!strcasecmp(param, "announce-position-only-up")) {<br>+              q->announcepositiononlyup = ast_true(val);<br>         } else if (!strcasecmp(param, "announce-position-limit")) {<br>                 q->announcepositionlimit = atoi(val);<br>      } else if (!strcasecmp(param, "periodic-announce")) {<br>@@ -3864,6 +3867,11 @@<br>               return 0;<br>     }<br> <br>+ /* If position has change but if set announce-position-only-up and the last position said is lower */<br>+        if (qe->parent->announcepositiononlyup && (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 ebb5da1..6ea2030 100644<br>--- a/configs/samples/queues.conf.sample<br>+++ b/configs/samples/queues.conf.sample<br>@@ -97,7 +97,7 @@<br> ; fewestcalls - ring the one with fewest completed calls from this queue<br> ; random - ring random interface<br> ; rrmemory - round robin with memory, remember where we left off last ring pass<br>-; rrordered - same as rrmemory, except the queue member order from config file <br>+; rrordered - same as rrmemory, except the queue member order from config file<br> ;             is preserved<br> ; linear - rings interfaces in the order specified in this configuration file.<br> ;          If you use dynamic members, the members will be rung in the order in<br>@@ -345,6 +345,11 @@<br> ;<br> ; announce-round-seconds = 10<br> ;<br>+; Only need say the position is up in caller list?<br>+; If set to yes, the announce of the position only when is up<br>+;<br>+; announce-position-only-up = no<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/5880">change 5880</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/5880"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I173a124121422209485b043e2bf784f54242fce6 </div>
<div style="display:none"> Gerrit-Change-Number: 5880 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Rodrigo Ramirez Norambuena <a@rodrigoramirez.com> </div>