[Asterisk-cvs] asterisk/apps app_queue.c,1.84,1.85

markster at lists.digium.com markster at lists.digium.com
Sat Sep 25 10:19:40 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv7360/apps

Modified Files:
	app_queue.c 
Log Message:
Make holdtime announcement say "less than 2 minutes" instead of "1 minutes" (bug #2500)


Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- app_queue.c	10 Sep 2004 15:11:37 -0000	1.84
+++ app_queue.c	25 Sep 2004 14:22:27 -0000	1.85
@@ -208,6 +208,7 @@
 	char sound_calls[80];           /* Sound file: "calls waiting to speak to a representative." (def. queue-callswaiting)*/
 	char sound_holdtime[80];        /* Sound file: "The current estimated total holdtime is" (def. queue-holdtime) */
 	char sound_minutes[80];         /* Sound file: "minutes." (def. queue-minutes) */
+	char sound_lessthan[80];        /* Sound file: "less-than" (def. queue-lessthan) */
 	char sound_seconds[80];         /* Sound file: "seconds." (def. queue-seconds) */
 	char sound_thanks[80];          /* Sound file: "Thank you for your patience." (def. queue-thankyou) */
 
@@ -434,7 +435,11 @@
 	if ((avgholdmins+avgholdsecs) > 0 && (qe->parent->announceholdtime) && (!(qe->parent->announceholdtime==1 && qe->last_pos)) ) {
 		res += play_file(qe->chan, qe->parent->sound_holdtime);
 		if(avgholdmins>0) {
-			res += ast_say_number(qe->chan, avgholdmins, AST_DIGIT_ANY, qe->chan->language, (char*) NULL);
+			if (avgholdmins < 2) {
+				res += play_file(qe->chan, qe->parent->sound_lessthan);
+				res += ast_say_number(qe->chan, 2, AST_DIGIT_ANY, qe->chan->language, (char *)NULL);
+			} else 
+				res += ast_say_number(qe->chan, avgholdmins, AST_DIGIT_ANY, qe->chan->language, (char*) NULL);
 			res += play_file(qe->chan, qe->parent->sound_minutes);
 		}
 		if(avgholdsecs>0) {
@@ -1776,6 +1781,7 @@
 				strncpy(q->sound_minutes, "queue-minutes", sizeof(q->sound_minutes) - 1);
 				strncpy(q->sound_seconds, "queue-seconds", sizeof(q->sound_seconds) - 1);
 				strncpy(q->sound_thanks, "queue-thankyou", sizeof(q->sound_thanks) - 1);
+				strncpy(q->sound_lessthan, "queue-lessthan", sizeof(q->sound_lessthan) - 1);
 				prev = q->members;
 				if (prev) {
 					/* find the end of any dynamic members */
@@ -1836,6 +1842,8 @@
 						strncpy(q->sound_minutes, var->value, sizeof(q->sound_minutes) - 1);
 					} else if (!strcasecmp(var->name, "queue-seconds")) {
 						strncpy(q->sound_seconds, var->value, sizeof(q->sound_seconds) - 1);
+					} else if (!strcasecmp(var->name, "queue-lessthan")) {
+						strncpy(q->sound_lessthan, var->value, sizeof(q->sound_lessthan) - 1);
 					} else if (!strcasecmp(var->name, "queue-thankyou")) {
 						strncpy(q->sound_thanks, var->value, sizeof(q->sound_thanks) - 1);
 					} else if (!strcasecmp(var->name, "announce-frequency")) {




More information about the svn-commits mailing list