mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
Merged revisions 174948 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r174948 | mmichelson | 2009-02-11 17:03:08 -0600 (Wed, 11 Feb 2009) | 35 lines 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/branches/1.6.0@174949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1834,6 +1834,7 @@ static int valid_exit(struct queue_ent *qe, char digit)
|
|||||||
static int say_position(struct queue_ent *qe, int ringing)
|
static int say_position(struct queue_ent *qe, int ringing)
|
||||||
{
|
{
|
||||||
int res = 0, avgholdmins, avgholdsecs;
|
int res = 0, avgholdmins, avgholdsecs;
|
||||||
|
int say_thanks = 1;
|
||||||
time_t now;
|
time_t now;
|
||||||
|
|
||||||
/* Let minannouncefrequency seconds pass between the start of each position announcement */
|
/* Let minannouncefrequency seconds pass between the start of each position announcement */
|
||||||
@@ -1916,7 +1917,8 @@ static int say_position(struct queue_ent *qe, int ringing)
|
|||||||
if (res)
|
if (res)
|
||||||
goto playout;
|
goto playout;
|
||||||
}
|
}
|
||||||
|
} else if (qe->parent->announceholdtime && !qe->parent->announceposition) {
|
||||||
|
say_thanks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
posout:
|
posout:
|
||||||
@@ -1924,7 +1926,9 @@ posout:
|
|||||||
ast_verb(3, "Told %s in %s their queue position (which was %d)\n",
|
ast_verb(3, "Told %s in %s their queue position (which was %d)\n",
|
||||||
qe->chan->name, qe->parent->name, qe->pos);
|
qe->chan->name, qe->parent->name, qe->pos);
|
||||||
}
|
}
|
||||||
|
if (say_thanks) {
|
||||||
res = play_file(qe->chan, qe->parent->sound_thanks);
|
res = play_file(qe->chan, qe->parent->sound_thanks);
|
||||||
|
}
|
||||||
|
|
||||||
playout:
|
playout:
|
||||||
if ((res > 0 && !valid_exit(qe, res)) || res < 0)
|
if ((res > 0 && !valid_exit(qe, res)) || res < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user