[asterisk-commits] app queue: Only do announcement logic between ringing cycles (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 26 06:23:30 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6580 )
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: Ic4290dc75256f9743900c6762ee1bb915f672db0
---
M apps/app_queue.c
1 file changed, 4 insertions(+), 14 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/apps/app_queue.c b/apps/app_queue.c
index ff93b02..80a013c 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4749,7 +4749,7 @@
*
* \todo eventually all call forward logic should be intergerated into and replaced by ast_call_forward()
*/
-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)
+static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed)
{
const char *queue = qe->parent->name;
struct callattempt *o, *start = NULL, *prev = NULL;
@@ -5271,16 +5271,6 @@
ast_frfree(f);
}
}
-
- /* Make a position announcement, if enabled */
- if (qe->parent->announcefrequency && qe->parent->announce_to_first_user) {
- say_position(qe, ringing);
- }
-
- /* Make a periodic announcement, if enabled */
- if (qe->parent->periodicannouncefrequency && qe->parent->announce_to_first_user) {
- say_periodic_announcement(qe, ringing);
- }
if (!*to) {
for (o = start; o; o = o->call_next) {
@@ -6688,7 +6678,7 @@
ring_one(qe, outgoing, &numbusies);
lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies,
ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT),
- forwardsallowed, ringing);
+ forwardsallowed);
ao2_lock(qe->parent);
if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY || qe->parent->strategy == QUEUE_STRATEGY_RRORDERED) {
@@ -8111,14 +8101,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/6580
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4290dc75256f9743900c6762ee1bb915f672db0
Gerrit-Change-Number: 6580
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Stefan Engström <stefanen at kth.se>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170926/8ecaa592/attachment-0001.html>
More information about the asterisk-commits
mailing list