mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
app_queue.c: Queue don't play "thank-you" when here is no hold time announcements
if holdtime is (0 min, 0 sec) there is no hold time announcements we should then also not playing queue-thankyou ASTERISK-29831 Change-Id: Ic7e51dcde526b23f1cd8d24e1d1e2d81e10f9d2c
This commit is contained in:
committed by
Joshua Colp
parent
5875c7bb6c
commit
93d090147f
@@ -4124,9 +4124,8 @@ 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, announceposition = 0;
|
int res = 0, say_thanks = 0;
|
||||||
long avgholdmins, avgholdsecs;
|
long 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 */
|
||||||
@@ -4155,11 +4154,7 @@ static int say_position(struct queue_ent *qe, int ringing)
|
|||||||
qe->parent->announceposition == ANNOUNCEPOSITION_MORE_THAN ||
|
qe->parent->announceposition == ANNOUNCEPOSITION_MORE_THAN ||
|
||||||
(qe->parent->announceposition == ANNOUNCEPOSITION_LIMIT &&
|
(qe->parent->announceposition == ANNOUNCEPOSITION_LIMIT &&
|
||||||
qe->pos <= qe->parent->announcepositionlimit)) {
|
qe->pos <= qe->parent->announcepositionlimit)) {
|
||||||
announceposition = 1;
|
say_thanks = 1;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (announceposition == 1) {
|
|
||||||
/* Say we're next, if we are */
|
/* Say we're next, if we are */
|
||||||
if (qe->pos == 1) {
|
if (qe->pos == 1) {
|
||||||
res = play_file(qe->chan, qe->parent->sound_next);
|
res = play_file(qe->chan, qe->parent->sound_next);
|
||||||
@@ -4203,6 +4198,7 @@ static int say_position(struct queue_ent *qe, int ringing)
|
|||||||
if ((avgholdmins+avgholdsecs) > 0 && qe->parent->announceholdtime &&
|
if ((avgholdmins+avgholdsecs) > 0 && qe->parent->announceholdtime &&
|
||||||
((qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE && !qe->last_pos) ||
|
((qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE && !qe->last_pos) ||
|
||||||
!(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE))) {
|
!(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE))) {
|
||||||
|
say_thanks = 1;
|
||||||
res = play_file(qe->chan, qe->parent->sound_holdtime);
|
res = play_file(qe->chan, qe->parent->sound_holdtime);
|
||||||
if (res) {
|
if (res) {
|
||||||
goto playout;
|
goto playout;
|
||||||
@@ -4237,8 +4233,6 @@ static int say_position(struct queue_ent *qe, int ringing)
|
|||||||
goto playout;
|
goto playout;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (qe->parent->announceholdtime && !qe->parent->announceposition) {
|
|
||||||
say_thanks = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
posout:
|
posout:
|
||||||
|
4
doc/CHANGES-staging/app_queue_say_thanks.txt
Normal file
4
doc/CHANGES-staging/app_queue_say_thanks.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Subject: app_queues
|
||||||
|
|
||||||
|
Don't play sound_thanks if there is no leading hold_time message
|
||||||
|
When the only announcement is hold time, and there is no hold time (0 min, 0 sec), asterisk will say "thank you for your patience"
|
Reference in New Issue
Block a user