<p>Stefan Engström has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6554">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: Only do announcement logic between ringing cycles<br><br>This patch reverts the change by patch 2263 from old reviewboard.<br>Note that reverting that 2263-patch still preserves the behaviour that<br>the commit log of the 2263-patch claimed to add. The reason for this is:<br><br>The function wait_for_answer is only called from try_calling which<br>in turn is only called from the main for loop in queue_exec, and<br>earlier in that loop we already check the things that's removed by<br>this patch. There's no need to check those things twice each loop<br>iteration, and I think the proper place to check it is before each<br>ringing cycle. By checking it in wait_for_answer, you allow the issue<br>explained in the jira - that the head caller hears announcements while<br>the agents' sip phones are actively ringing.<br><br>Reported-by: Stefan Engström<br>Tested-by: Stefan Engström<br>ASTERISK-27216 #close<br><br>Change-Id: I91b5701b158fc0bd79ab1da7d42c5f68c936c722<br>---<br>M apps/app_queue.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/54/6554/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 5a65595..2e248c8 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -8062,14 +8062,14 @@<br> <br>               if (makeannouncement) {<br>                       /* Make a position announcement, if enabled */<br>-                       if (qe.parent->announcefrequency)<br>+                 if (qe.parent->announcefrequency && qe->parent->announce_to_first_user)<br>                              if ((res = say_position(&qe,ringing)))<br>                                    goto stop;<br>            }<br>             makeannouncement = 1;<br> <br>              /* Make a periodic announcement, if enabled */<br>-               if (qe.parent->periodicannouncefrequency) {<br>+               if (qe.parent->periodicannouncefrequency && qe->parent->announce_to_first_user) {<br>                    if ((res = say_periodic_announcement(&qe,ringing))) {<br>                             goto stop;<br>                    }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6554">change 6554</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/6554"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I91b5701b158fc0bd79ab1da7d42c5f68c936c722 </div>
<div style="display:none"> Gerrit-Change-Number: 6554 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Stefan Engström <stefanen@kth.se> </div>