[Asterisk-code-review] app_queue: Reset all queue defaults before reload. (asterisk[18])

Sean Bright asteriskteam at digium.com
Tue Jan 31 08:50:50 CST 2023


Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19885 )


Change subject: app_queue: Reset all queue defaults before reload.
......................................................................

app_queue: Reset all queue defaults before reload.

Several queue fields were not being set to their default value during
a reload.

Additionally added some sample configuration options that were missing
from queues.conf.sample.

Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4
---
M apps/app_queue.c
M configs/samples/queues.conf.sample
2 files changed, 33 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/19885/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 288c0ff..20bb1d8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2956,7 +2956,11 @@
 	q->timeout = DEFAULT_TIMEOUT;
 	q->maxlen = 0;
 
+	ast_string_field_set(q, announce, "");
 	ast_string_field_set(q, context, "");
+	ast_string_field_set(q, membermacro, "");
+	ast_string_field_set(q, membergosub, "");
+	ast_string_field_set(q, defaultrule, "");
 
 	q->announcefrequency = 0;
 	q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;
@@ -2985,7 +2989,10 @@
 	q->periodicannouncefrequency = 0;
 	q->randomperiodicannounce = 0;
 	q->numperiodicannounce = 0;
+	q->relativeperiodicannounce = 0;
 	q->autopause = QUEUE_AUTOPAUSE_OFF;
+	q->autopausebusy = 0;
+	q->autopauseunavail = 0;
 	q->timeoutpriority = TIMEOUT_PRIORITY_APP;
 	q->autopausedelay = 0;
 	if (!q->members) {
@@ -3010,6 +3017,7 @@
 	ast_string_field_set(q, sound_minute, "queue-minute");
 	ast_string_field_set(q, sound_seconds, "queue-seconds");
 	ast_string_field_set(q, sound_thanks, "queue-thankyou");
+	ast_string_field_set(q, sound_callerannounce, "");
 	ast_string_field_set(q, sound_reporthold, "queue-reporthold");
 
 	if (!q->sound_periodicannounce[0]) {
diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample
index f40342e..fbb5653 100644
--- a/configs/samples/queues.conf.sample
+++ b/configs/samples/queues.conf.sample
@@ -78,6 +78,12 @@
 ;
 ;announce = queue-markq
 ;
+; An announcement may be specified which is played to the caller just
+; before they are bridged with an agent. The default is to not play an
+; announcement to the caller.
+;
+;queue-callerannounce = you-are-being-connected
+;
 ; A strategy may be specified.  Valid strategies include:
 ;
 ; ringall - ring all available channels until one answers (default)
@@ -354,6 +360,10 @@
 ;queue-thereare	= queue-thereare
 			;	("calls waiting.")
 ;queue-callswaiting = queue-callswaiting
+			;	("Currently there are more than")
+;queue-quantity1 = queue-quantity1
+			;	("callers waiting to speak with a representative")
+;queue-quantity2 = queue-quantity2
 			;	("The current est. holdtime is")
 ;queue-holdtime = queue-holdtime
 			;	("minute.")

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19885
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4
Gerrit-Change-Number: 19885
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230131/b45c6fba/attachment.html>


More information about the asterisk-code-review mailing list