# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/09/23 16:47:40-07:00 root@pbx-a.ph.star # app_queue.c: # don't play thanks message on first position announcement # # apps/app_queue.c # 2004/09/23 16:47:25-07:00 root@pbx-a.ph.star +5 -1 # don't play thanks message on first position announcement # diff -Nru a/apps/app_queue.c b/apps/app_queue.c --- a/apps/app_queue.c 2004-09-25 20:10:00 -07:00 +++ b/apps/app_queue.c 2004-09-25 20:10:00 -07:00 @@ -172,6 +172,7 @@ int handled; /* Whether our call was handled */ time_t start; /* When we started holding */ int queuetimeout; /* How many seconds before timing out of queue */ + int saythanks; /* Whether to play "thanks" message */ struct ast_channel *chan; /* Our channel */ struct queue_ent *next; /* The next queue entry */ }; @@ -451,7 +452,9 @@ if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Told %s in %s their queue position (which was %d)\n", qe->chan->name, qe->parent->name, qe->pos); - res += play_file(qe->chan, qe->parent->sound_thanks); + if (qe->saythanks) + res += play_file(qe->chan, qe->parent->sound_thanks); + qe->saythanks = 1; ast_moh_start(qe->chan, qe->moh); return (res>0); @@ -1585,6 +1588,7 @@ qe.prio = (int)prio; qe.last_pos_said = 0; qe.last_pos = 0; + qe.saythanks = 0; if (!join_queue(queuename, &qe)) { ast_queue_log(queuename, chan->uniqueid, "NONE", "ENTERQUEUE", "%s|%s", url ? url : "", chan->callerid ? chan->callerid : ""); /* Start music on hold */