# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/09/27 22:41:01-07:00 root@host-a.ph.star # app_queue.c: # make skipfirsthankyou configurable # queues.conf.sample: # add sample for skipfirstthankyou # # apps/app_queue.c # 2004/09/27 22:40:55-07:00 root@host-a.ph.star +8 -4 # make skipfirsthankyou configurable # # configs/queues.conf.sample # 2004/09/27 22:30:34-07:00 root@host-a.ph.star +4 -0 # add sample for skipfirstthankyou # # ChangeSet # 2004/09/27 21:44:46-07:00 root@host-a.ph.star # app_queue.c: # Import patch queue.patch # # apps/app_queue.c # 2004/09/27 21:43:48-07:00 root@host-a.ph.star +5 -1 # Import patch queue.patch # diff -Nru a/apps/app_queue.c b/apps/app_queue.c --- a/apps/app_queue.c 2004-09-27 23:06:52 -07:00 +++ b/apps/app_queue.c 2004-09-27 23:06:52 -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 skipfirstthankyou; /* Whether to play "thanks" message */ struct ast_channel *chan; /* Our channel */ struct queue_ent *next; /* The next queue entry */ }; @@ -196,6 +197,7 @@ int announcefrequency; /* How often to announce their position */ int roundingseconds; /* How many seconds do we round to? */ int announceholdtime; /* When to announce holdtime: 0 = never, -1 = every announcement, 1 = only once */ + int skipfirstthankyou; /* 1 to skip "thank you" with first position announcement */ int holdtime; /* Current avg holdtime for this queue, based on recursive boxcar filter */ int callscompleted; /* Number of queue calls completed */ int callsabandoned; /* Number of queue calls abandoned */ @@ -314,6 +316,7 @@ strncpy(qe->moh, q->moh, sizeof(qe->moh) - 1); strncpy(qe->announce, q->announce, sizeof(qe->announce) - 1); strncpy(qe->context, q->context, sizeof(qe->context) - 1); + qe->skipfirstthankyou = q->skipfirstthankyou; q->count++; res = 0; manager_event(EVENT_FLAG_CALL, "Join", @@ -456,7 +459,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->skipfirstthankyou) + res += play_file(qe->chan, qe->parent->sound_thanks); + qe->skipfirstthankyou = 0; ast_moh_start(qe->chan, qe->moh); return (res>0); @@ -1762,6 +1767,7 @@ q->maxlen = 0; q->announcefrequency = 0; q->announceholdtime = 0; + q->skipfirstthankyou = 0; q->roundingseconds = 0; /* Default - don't announce seconds */ q->holdtime = 0; q->callscompleted = 0; @@ -1874,6 +1880,8 @@ q->joinempty = ast_true(var->value); } else if (!strcasecmp(var->name, "eventwhencalled")) { q->eventwhencalled = ast_true(var->value); + } else if (!strcasecmp(var->name, "skipfirstthankyou")) { + q->skipfirstthankyou = ast_true(var->value); } else { ast_log(LOG_WARNING, "Unknown keyword in queue '%s': %s at line %d of queue.conf\n", cat, var->name, var->lineno); } diff -Nru a/configs/queues.conf.sample b/configs/queues.conf.sample --- a/configs/queues.conf.sample 2004-09-27 23:06:52 -07:00 +++ b/configs/queues.conf.sample 2004-09-27 23:06:52 -07:00 @@ -75,6 +75,10 @@ ; or "less than 2 minutes" when appropriate. ; ;announce-holdtime = yes|no|once +; +; Should we include the "thank you" message (see below) with the first position announcement? +; Either yes or no. +;skipfirstthankyou = no ; ; What's the rounding time for the seconds?