summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-02-11 23:03:08 +0000
committerMark Michelson <mmichelson@digium.com>2009-02-11 23:03:08 +0000
commit34161542e9ffacc405513c8a1ccb706dfe55ef9d (patch)
tree10f6630b405f736f09f8c90c6295159bfac656d6 /apps
parent47ebea6a8dfa92475ad531e83b9c3d3fbad0e9c1 (diff)
Fix odd "thank you" sound playing behavior in app_queue.c
If someone has configured the queue to play an position or holdtime announcement, then it is odd and potentially unexpected to hear a "Thank you for your patience" sound when no position or holdtime was actually announced. This fixes the announcement so that the "thanks" sound is only played in the case that a position or holdtime was actually announced. There is a way that the "thank you" sound can be played without a position or holdtime, and that is to set announce-frequency to a value but keep announce-position and announce-holdtime both turned off. (closes issue #14227) Reported by: caspy Patches: 14227_v3.patch uploaded by putnopvut (license 60) Tested by: caspy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index d1f20d609..eb02322c2 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2012,6 +2012,7 @@ static int valid_exit(struct queue_ent *qe, char digit)
static int say_position(struct queue_ent *qe, int ringing)
{
int res = 0, avgholdmins, avgholdsecs, announceposition = 0;
+ int say_thanks = 1;
time_t now;
/* Let minannouncefrequency seconds pass between the start of each position announcement */
@@ -2120,11 +2121,12 @@ static int say_position(struct queue_ent *qe, int ringing)
if (res)
goto playout;
}
-
+ } else if (qe->parent->announceholdtime && !qe->parent->announceposition) {
+ say_thanks = 0;
}
posout:
- if (announceposition == 1){
+ if (announceposition == 1 || say_thanks) {
if (qe->parent->announceposition) {
ast_verb(3, "Told %s in %s their queue position (which was %d)\n",
qe->chan->name, qe->parent->name, qe->pos);