Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 84744) +++ apps/app_queue.c (working copy) @@ -375,6 +375,7 @@ 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 periodicannouncefirstplay; /*!< After how long to play the first periodic announcement */ int roundingseconds; /*!< How many seconds do we round to? */ int holdtime; /*!< Current avg holdtime, based on recursive boxcar filter */ int callscompleted; /*!< Number of queue calls completed */ @@ -814,6 +815,7 @@ q->context[0] = '\0'; q->monfmt[0] = '\0'; q->periodicannouncefrequency = 0; + q->periodicannouncefirstplay = 0; q->sound_callerannounce[0] = '\0'; /* Default, don't announce the caller that he has been answered */ if(!q->members) q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn); @@ -1025,6 +1027,8 @@ } } else if (!strcasecmp(param, "periodic-announce-frequency")) { q->periodicannouncefrequency = atoi(val); + } else if (!strcasecmp(param, "periodic-announce-firstplay")) { + q->periodicannouncefirstplay = atoi(val); } else if (!strcasecmp(param, "retry")) { q->retry = atoi(val); if (q->retry <= 0) @@ -2029,9 +2033,13 @@ time(&now); /* Check to see if it is time to announce */ - if ((now - qe->last_periodic_announce_time) < qe->parent->periodicannouncefrequency) + if ((now - qe->last_periodic_announce_time) < + (qe->parent->periodicannouncefirstplay ? qe->parent->periodicannouncefirstplay : qe->parent->periodicannouncefrequency)) return 0; + /* We've played once, so we dont need this anymore */ + qe->parent->periodicannouncefirstplay = 0; + /* Stop the music on hold so we can play our own file */ if (ringing) ast_indicate(qe->chan,-1); Index: configs/queues.conf.sample =================================================================== --- configs/queues.conf.sample (revision 84744) +++ configs/queues.conf.sample (working copy) @@ -193,6 +193,12 @@ ; ;periodic-announce-frequency=60 ; +; When to play the first periodic announcement. This allows you to +; play the first announcement at the beginning of the call then revert +; back to a much higher frequency (0=off) +; +;periodic-announce-firstplay=10 +; ; Should we include estimated hold time in position announcements? ; Either yes, no, or only once. ; Hold time will be announced as the estimated time,