[Asterisk-code-review] app queue: Only do announcement logic between ringing cycles (asterisk[13])

Stefan Engström asteriskteam at digium.com
Thu Sep 21 03:26:13 CDT 2017


Stefan Engström has uploaded this change for review. ( https://gerrit.asterisk.org/6554


Change subject: app_queue: Only do announcement logic between ringing cycles
......................................................................

app_queue: Only do announcement logic between ringing cycles

This patch reverts the change by patch 2263 from old reviewboard.
Note that reverting that 2263-patch still preserves the behaviour that
the commit log of the 2263-patch claimed to add. The reason for this is:

The function wait_for_answer is only called from try_calling which
in turn is only called from the main for loop in queue_exec, and
earlier in that loop we already check the things that's removed by
this patch. There's no need to check those things twice each loop
iteration, and I think the proper place to check it is before each
ringing cycle. By checking it in wait_for_answer, you allow the issue
explained in the jira - that the head caller hears announcements while
the agents' sip phones are actively ringing.

Reported-by: Stefan Engström
Tested-by: Stefan Engström
ASTERISK-27216 #close

Change-Id: I91b5701b158fc0bd79ab1da7d42c5f68c936c722
---
M apps/app_queue.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/54/6554/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 5a65595..2e248c8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8062,14 +8062,14 @@
 
 		if (makeannouncement) {
 			/* Make a position announcement, if enabled */
-			if (qe.parent->announcefrequency)
+			if (qe.parent->announcefrequency && qe->parent->announce_to_first_user)
 				if ((res = say_position(&qe,ringing)))
 					goto stop;
 		}
 		makeannouncement = 1;
 
 		/* Make a periodic announcement, if enabled */
-		if (qe.parent->periodicannouncefrequency) {
+		if (qe.parent->periodicannouncefrequency && qe->parent->announce_to_first_user) {
 			if ((res = say_periodic_announcement(&qe,ringing))) {
 				goto stop;
 			}

-- 
To view, visit https://gerrit.asterisk.org/6554
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91b5701b158fc0bd79ab1da7d42c5f68c936c722
Gerrit-Change-Number: 6554
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Engström <stefanen at kth.se>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170921/8d88e281/attachment.html>


More information about the asterisk-code-review mailing list