diff --git a/UPGRADE.txt b/UPGRADE.txt index e8a3996525..dfe808141e 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -21,7 +21,6 @@ === =========================================================== - AMI: - The SIP SIPqualifypeer action now sends a response indicating it will qualify a peer once a peer has been found to qualify. Once the qualify has been @@ -55,6 +54,11 @@ Queues: Queue member being paused would result in a disposition of BUSY. - Removed the queues.conf check_state_unknown option. It is no longer necessary. + - It is now possible to play the Queue prompts to the first user waiting in a + call queue. Note that this may impact the ability for agents to talk with + users, as a prompt may still be playing when an agent connects to the user. + This ability is disabled by default but can be enabled on an individual + queue using the 'announce-to-first-user' option. Dial: - Now recognizes 'W' to pause sending DTMF for one second in addition to diff --git a/apps/app_queue.c b/apps/app_queue.c index 5c61d83e7a..4c96583137 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1517,6 +1517,7 @@ struct call_queue { struct ast_str *sound_periodicannounce[MAX_PERIODIC_ANNOUNCEMENTS]; unsigned int dead:1; unsigned int ringinuse:1; + unsigned int announce_to_first_user:1; /*!< Whether or not we announce to the first user in a queue */ unsigned int setinterfacevar:1; unsigned int setqueuevar:1; unsigned int setqueueentryvar:1; @@ -2370,6 +2371,7 @@ static void init_queue(struct call_queue *q) q->roundingseconds = 0; /* Default - don't announce seconds */ q->servicelevel = 0; q->ringinuse = 1; + q->announce_to_first_user = 0; q->setinterfacevar = 0; q->setqueuevar = 0; q->setqueueentryvar = 0; @@ -2648,6 +2650,8 @@ static void queue_set_param(struct call_queue *q, const char *param, const char ast_string_field_set(q, sound_reporthold, val); } else if (!strcasecmp(param, "announce-frequency")) { q->announcefrequency = atoi(val); + } else if (!strcasecmp(param, "announce-to-first-user")) { + q->announce_to_first_user = ast_true(val); } else if (!strcasecmp(param, "min-announce-frequency")) { q->minannouncefrequency = atoi(val); ast_debug(1, "%s=%s for queue '%s'\n", param, val, q->name); @@ -4820,12 +4824,12 @@ skip_frame:; } /* Make a position announcement, if enabled */ - if (qe->parent->announcefrequency) { + if (qe->parent->announcefrequency && qe->parent->announce_to_first_user) { say_position(qe, ringing); } /* Make a periodic announcement, if enabled */ - if (qe->parent->periodicannouncefrequency) { + if (qe->parent->periodicannouncefrequency && qe->parent->announce_to_first_user) { say_periodic_announcement(qe, ringing); } @@ -9661,6 +9665,7 @@ static struct ast_cli_entry cli_queue[] = { MEMBER(call_queue, sound_reporthold, AST_DATA_STRING) \ MEMBER(call_queue, dead, AST_DATA_BOOLEAN) \ MEMBER(call_queue, ringinuse, AST_DATA_BOOLEAN) \ + MEMBER(call_queue, announce_to_first_user, AST_DATA_BOOLEAN) \ MEMBER(call_queue, setinterfacevar, AST_DATA_BOOLEAN) \ MEMBER(call_queue, setqueuevar, AST_DATA_BOOLEAN) \ MEMBER(call_queue, setqueueentryvar, AST_DATA_BOOLEAN) \ diff --git a/configs/queues.conf.sample b/configs/queues.conf.sample index 80b581f313..9f3ba97def 100644 --- a/configs/queues.conf.sample +++ b/configs/queues.conf.sample @@ -317,6 +317,13 @@ monitor-type = MixMonitor ; ;announce-position = yes ; +; If enabled, play announcements to the first user waiting in the Queue. This may mean +; that announcements are played when an agent attempts to connect to the waiting user, +; which may delay the time before the agent and the user can communicate. Disabled by +; default. +; +; announce-to-first-user = no +; ; If you have specified "limit" or "more" for the announce-position option, then the following ; value is what is used to determine what announcement to play to waiting callers. If you have ; set the announce-position option to anything else, then this will have no bearing on queue operation