mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Add a min-announce-frequency option to queues.conf which allows you to control the
minimum amount of time between queue announcements for use when the caller's queue position changes frequently. (issue #9604, patch by Matthew Roth) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										32
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								CHANGES
									
									
									
									
									
								
							| @@ -75,7 +75,25 @@ Voicemail Changes | |||||||
|   * Added the ability to customize which sound files are used for some of the |   * Added the ability to customize which sound files are used for some of the | ||||||
|      prompts within the Voicemail application by changing them in voicemail.conf |      prompts within the Voicemail application by changing them in voicemail.conf | ||||||
|   * Added the ability for the "voicemail show users" CLI command to show users |   * Added the ability for the "voicemail show users" CLI command to show users | ||||||
|     configured by the dynamic realtime configuration method. |      configured by the dynamic realtime configuration method. | ||||||
|  |  | ||||||
|  | Queue changes | ||||||
|  | ------------- | ||||||
|  |   * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and  | ||||||
|  |      setqueueentryvar options for each queue, see queues.conf.sample for details. | ||||||
|  |   * Added keepstats option to queues.conf which will keep queue | ||||||
|  |      statistics during a reload. | ||||||
|  |   * setinterfacevar option in queues.conf also now sets a variable | ||||||
|  |      called MEMBERNAME which contains the member's name. | ||||||
|  |   * Added 'Strategy' field to manager event QueueParams which represents | ||||||
|  |      the queue strategy in use.  | ||||||
|  |   * Added option to run macro when a queue member is connected to a caller,  | ||||||
|  |      see queues.conf.sample for details. | ||||||
|  |   * app_queue now has a 'loose' option which is almost exactly like 'strict' except it | ||||||
|  |      does not count paused queue members as unavailable. | ||||||
|  |   * Added min-announce-frequency option to queues.conf which allows you to control the | ||||||
|  |      minimum amount of time between queue announcements for use when the caller's queue | ||||||
|  |      position changes frequently. | ||||||
|  |  | ||||||
| Miscellaneous  | Miscellaneous  | ||||||
| ------------- | ------------- | ||||||
| @@ -97,16 +115,10 @@ Miscellaneous | |||||||
|      can use --with-cap to specify the path. |      can use --with-cap to specify the path. | ||||||
|   * H323 remote hold notification support added (by NOTIFY message |   * H323 remote hold notification support added (by NOTIFY message | ||||||
|      and/or H.450 supplementary service) |      and/or H.450 supplementary service) | ||||||
|   * Added keepstats option to queues.conf which will keep queue |  | ||||||
|      statistics during a reload. |  | ||||||
|   * Added rotatetimestamp option to logger.conf which will use |   * Added rotatetimestamp option to logger.conf which will use | ||||||
|      the time to name the logger files instead of sequence number. |      the time to name the logger files instead of sequence number. | ||||||
|   * setinterfacevar option in queues.conf also now sets a variable |  | ||||||
|      called MEMBERNAME which contains the member's name. |  | ||||||
|   * Added Masquerade manager event for when a masquerade happens between |   * Added Masquerade manager event for when a masquerade happens between | ||||||
|      two channels. |      two channels. | ||||||
|   * Added 'Strategy' field to manager event QueueParams which represents |  | ||||||
|      the queue strategy in use.  |  | ||||||
|   * From the to-do lists: straighten out the app timeout args: |   * From the to-do lists: straighten out the app timeout args: | ||||||
|      Wait() app now really does 0.3 seconds- was truncating arg to an int. |      Wait() app now really does 0.3 seconds- was truncating arg to an int. | ||||||
|      WaitExten() same as Wait(). |      WaitExten() same as Wait(). | ||||||
| @@ -117,14 +129,8 @@ Miscellaneous | |||||||
|      SpeechBackground() -- clarified in the docstrings that the timeout is an integer seconds. |      SpeechBackground() -- clarified in the docstrings that the timeout is an integer seconds. | ||||||
|   * Added 'C' option to Meetme which causes a caller to continue in the dialplan |   * Added 'C' option to Meetme which causes a caller to continue in the dialplan | ||||||
|      when kicked out. |      when kicked out. | ||||||
|   * Added option to run macro when a queue member is connected to a caller,  |  | ||||||
|      see queues.conf.sample for details. |  | ||||||
|   * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and  |  | ||||||
|     setqueueentryvar options for each queue, see queues.conf.sample for details. |  | ||||||
|   * Brazilian Portuguese (pt-BR) in VM, and say.c was added via patch from cfassoni. |   * Brazilian Portuguese (pt-BR) in VM, and say.c was added via patch from cfassoni. | ||||||
|   * CID matching information is now shown when doing 'dialplan show'. |   * CID matching information is now shown when doing 'dialplan show'. | ||||||
|   * app_queue now has a 'loose' option which is almost exactly like 'strict' except it |  | ||||||
|      does not count paused queue members as unavailable. |  | ||||||
|   * Added maxfiles option to options section of asterisk.conf which allows you to specify |   * Added maxfiles option to options section of asterisk.conf which allows you to specify | ||||||
|      what Asterisk should set as the maximum number of open files when it loads. |      what Asterisk should set as the maximum number of open files when it loads. | ||||||
|   * Added the jittertargetextra configuration option. |   * Added the jittertargetextra configuration option. | ||||||
|   | |||||||
| @@ -116,6 +116,8 @@ static struct strategy { | |||||||
| #define DEFAULT_TIMEOUT		15 | #define DEFAULT_TIMEOUT		15 | ||||||
| #define RECHECK			1		/* Recheck every second to see we we're at the top yet */ | #define RECHECK			1		/* Recheck every second to see we we're at the top yet */ | ||||||
| #define MAX_PERIODIC_ANNOUNCEMENTS 10 /* The maximum periodic announcements we can have */ | #define MAX_PERIODIC_ANNOUNCEMENTS 10 /* The maximum periodic announcements we can have */ | ||||||
|  | #define DEFAULT_MIN_ANNOUNCE_FREQUENCY 15 /* The minimum number of seconds between position announcements | ||||||
|  |                                              The default value of 15 provides backwards compatibility */ | ||||||
|  |  | ||||||
| #define	RES_OKAY	0		/* Action completed */ | #define	RES_OKAY	0		/* Action completed */ | ||||||
| #define	RES_EXISTS	(-1)		/* Entry already exists */ | #define	RES_EXISTS	(-1)		/* Entry already exists */ | ||||||
| @@ -366,6 +368,7 @@ struct call_queue { | |||||||
| 	unsigned int maskmemberstatus:1; | 	unsigned int maskmemberstatus:1; | ||||||
| 	unsigned int realtime:1; | 	unsigned int realtime:1; | ||||||
| 	int announcefrequency;              /*!< How often to announce their position */ | 	int announcefrequency;              /*!< How often to announce their position */ | ||||||
|  | 	int minannouncefrequency;           /*!< The minimum number of seconds between position announcements (def. 15) */ | ||||||
| 	int periodicannouncefrequency;      /*!< How often to play periodic announcement */ | 	int periodicannouncefrequency;      /*!< How often to play periodic announcement */ | ||||||
| 	int roundingseconds;                /*!< How many seconds do we round to? */ | 	int roundingseconds;                /*!< How many seconds do we round to? */ | ||||||
| 	int holdtime;                       /*!< Current avg holdtime, based on recursive boxcar filter */ | 	int holdtime;                       /*!< Current avg holdtime, based on recursive boxcar filter */ | ||||||
| @@ -673,6 +676,7 @@ static void init_queue(struct call_queue *q) | |||||||
| 	q->timeout = -1; | 	q->timeout = -1; | ||||||
| 	q->maxlen = 0; | 	q->maxlen = 0; | ||||||
| 	q->announcefrequency = 0; | 	q->announcefrequency = 0; | ||||||
|  | 	q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY; | ||||||
| 	q->announceholdtime = 0; | 	q->announceholdtime = 0; | ||||||
| 	q->roundingseconds = 0; /* Default - don't announce seconds */ | 	q->roundingseconds = 0; /* Default - don't announce seconds */ | ||||||
| 	q->servicelevel = 0; | 	q->servicelevel = 0; | ||||||
| @@ -847,6 +851,9 @@ static void queue_set_param(struct call_queue *q, const char *param, const char | |||||||
| 		ast_copy_string(q->sound_reporthold, val, sizeof(q->sound_reporthold)); | 		ast_copy_string(q->sound_reporthold, val, sizeof(q->sound_reporthold)); | ||||||
| 	} else if (!strcasecmp(param, "announce-frequency")) { | 	} else if (!strcasecmp(param, "announce-frequency")) { | ||||||
| 		q->announcefrequency = atoi(val); | 		q->announcefrequency = atoi(val); | ||||||
|  | 	} else if (!strcasecmp(param, "min-announce-frequency")) { | ||||||
|  | 		q->minannouncefrequency = atoi(val); | ||||||
|  | 		ast_log(LOG_DEBUG, "%s=%s for queue '%s'\n", param, val, q->name); | ||||||
| 	} else if (!strcasecmp(param, "announce-round-seconds")) { | 	} else if (!strcasecmp(param, "announce-round-seconds")) { | ||||||
| 		q->roundingseconds = atoi(val); | 		q->roundingseconds = atoi(val); | ||||||
| 		if (q->roundingseconds>60 || q->roundingseconds<0) { | 		if (q->roundingseconds>60 || q->roundingseconds<0) { | ||||||
| @@ -1308,9 +1315,9 @@ static int say_position(struct queue_ent *qe) | |||||||
| 	int res = 0, avgholdmins, avgholdsecs; | 	int res = 0, avgholdmins, avgholdsecs; | ||||||
| 	time_t now; | 	time_t now; | ||||||
|  |  | ||||||
| 	/* Check to see if this is ludicrous -- if we just announced position, don't do it again*/ | 	/* Let minannouncefrequency seconds pass between the start of each position announcement */ | ||||||
| 	time(&now); | 	time(&now); | ||||||
| 	if ((now - qe->last_pos) < 15) | 	if ((now - qe->last_pos) < qe->parent->minannouncefrequency) | ||||||
| 		return 0; | 		return 0; | ||||||
|  |  | ||||||
| 	/* If either our position has changed, or we are over the freq timer, say position */ | 	/* If either our position has changed, or we are over the freq timer, say position */ | ||||||
|   | |||||||
| @@ -167,9 +167,18 @@ monitor-type = MixMonitor | |||||||
|  |  | ||||||
| ; How often to announce queue position and/or estimated  | ; How often to announce queue position and/or estimated  | ||||||
| ; holdtime to caller (0=off) | ; holdtime to caller (0=off) | ||||||
|  | ; Note that this value is ignored if the caller's queue | ||||||
|  | ; position has changed (see min-announce-frequency) | ||||||
| ; | ; | ||||||
| ;announce-frequency = 90  | ;announce-frequency = 90  | ||||||
| ; | ; | ||||||
|  | ; The absolute minimum time between the start of each | ||||||
|  | ; queue position and/or estimated holdtime announcement | ||||||
|  | ; This is useful for avoiding constant announcements | ||||||
|  | ; when the caller's queue position is changing frequently | ||||||
|  | ; (see announce-frequency) | ||||||
|  | ; | ||||||
|  | ;min-announce-frequency = 15 | ||||||
| ; | ; | ||||||
| ; How often to make any periodic announcement (see periodic-announce) | ; How often to make any periodic announcement (see periodic-announce) | ||||||
| ; | ; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user