<p>Stefan Engström has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6506">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: Ic4290dc75256f9743900c6762ee1bb915f672db0<br>---<br>M apps/app_queue.c<br>1 file changed, 2 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/06/6506/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 3fed5dc..5a65595 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -4724,7 +4724,7 @@<br> *<br> * \todo eventually all call forward logic should be intergerated into and replaced by ast_call_forward()<br> */<br>-static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed, int ringing)<br>+static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed)<br> {<br> const char *queue = qe->parent->name;<br> struct callattempt *o, *start = NULL, *prev = NULL;<br>@@ -5242,16 +5242,6 @@<br> ast_frfree(f);<br> }<br> }<br>-<br>- /* Make a position announcement, if enabled */<br>- if (qe->parent->announcefrequency && qe->parent->announce_to_first_user) {<br>- say_position(qe, ringing);<br>- }<br>-<br>- /* Make a periodic announcement, if enabled */<br>- if (qe->parent->periodicannouncefrequency && qe->parent->announce_to_first_user) {<br>- say_periodic_announcement(qe, ringing);<br>- }<br> <br> if (!*to) {<br> for (o = start; o; o = o->call_next) {<br>@@ -6659,7 +6649,7 @@<br> ring_one(qe, outgoing, &numbusies);<br> lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies,<br> ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT),<br>- forwardsallowed, ringing);<br>+ forwardsallowed);<br> <br> ao2_lock(qe->parent);<br> if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY || qe->parent->strategy == QUEUE_STRATEGY_RRORDERED) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6506">change 6506</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/6506"/><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: Ic4290dc75256f9743900c6762ee1bb915f672db0 </div>
<div style="display:none"> Gerrit-Change-Number: 6506 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Stefan Engström <stefanen@kth.se> </div>