Add announce-to-first-user option for app_queue

In r386792, the ability to play prompts to the first caller in a call queue was
added. While this is arguably a bug fix for those who expect the first caller
to continue receiving prompts while the agent is dialed, it has the side effect
of preventing the first caller from hearing the agent immediately upon
bridging. This may not be a problem for those who really want this option, but
for those who didn't care whether or not the first caller in queue heard their
position, it was an issue.

This patch disables the ability for the first caller in the queue to hear
prompts and adds a new option, announce-to-first-user, to queues.conf. Those
who the behavior can enable it by setting this value to True.

Note that if we ever implement the ability to have the prompts be stopped
upon bridging, this option can be removed.

(closes issue ASTERISK-21782)
Reported by: Remi Quezada
........

Merged revisions 391215 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/61/61/1
Matthew Jordan 12 years ago
parent f09521a0d5
commit 4a99d74105

@ -24,6 +24,12 @@ From 11.4 to 11.5:
* The default settings for chan_sip are now overriden properly by the general
settings in sip.conf. Please look over your settings upon upgrading.
* 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.
From 11.3 to 11.4:
* Added the 'n' option to MeetMe to prevent application of the DENOISE function
to a channel joining a conference. Some channel drivers that vary the number

@ -1243,6 +1243,7 @@ struct call_queue {
unsigned int dead:1;
unsigned int eventwhencalled:2;
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;
@ -2008,6 +2009,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;
@ -2288,6 +2290,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);
@ -4589,12 +4593,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);
}
@ -9576,6 +9580,7 @@ static struct ast_cli_entry cli_queue[] = {
MEMBER(call_queue, dead, AST_DATA_BOOLEAN) \
MEMBER(call_queue, eventwhencalled, 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) \

@ -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

Loading…
Cancel
Save