<p>Jaco Kroon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19899">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: option to start the periodic announcements at a different<br>time interval than the frequency.<br><br>Change-Id: Ia79984b6377ef78f167ad9ea2ac084bec29955d0<br>Signed-off-by: Jaco Kroon <jaco@uls.co.za><br>---<br>M apps/app_queue.c<br>M configs/samples/queues.conf.sample<br>2 files changed, 24 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/99/19899/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_queue.c b/apps/app_queue.c</span><br><span>index 084f25b..5ead140 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -1839,6 +1839,7 @@</span><br><span> int announcepositionlimit; /*!< How many positions we announce? */</span><br><span> int announcefrequency; /*!< How often to announce their position */</span><br><span> int minannouncefrequency; /*!< The minimum number of seconds between position announcements (def. 15) */</span><br><span style="color: hsl(120, 100%, 40%);">+ int periodicannouncestartdelay; /*!< How long into the queue should the periodic accouncement start */</span><br><span> int periodicannouncefrequency; /*!< How often to play periodic announcement */</span><br><span> int numperiodicannounce; /*!< The number of periodic announcements configured */</span><br><span> int randomperiodicannounce; /*!< Are periodic announcments randomly chosen */</span><br><span>@@ -3423,6 +3424,8 @@</span><br><span> ast_str_set(&q->sound_periodicannounce[0], 0, "%s", val);</span><br><span> q->numperiodicannounce = 1;</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (!strcasecmp(param, "periodic-announce-startdelay")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ q->periodicannouncestartdelay = atoi(val);</span><br><span> } else if (!strcasecmp(param, "periodic-announce-frequency")) {</span><br><span> q->periodicannouncefrequency = atoi(val);</span><br><span> } else if (!strcasecmp(param, "relative-periodic-announce")) {</span><br><span>@@ -8522,6 +8525,10 @@</span><br><span> qe.last_pos_said = 0;</span><br><span> qe.last_pos = 0;</span><br><span> qe.last_periodic_announce_time = time(NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (qe.parent->periodicannouncestartdelay >= 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ qe.last_periodic_announce_time += qe.parent->periodicannouncestartdelay;</span><br><span style="color: hsl(120, 100%, 40%);">+ qe.last_periodic_announce_time -= qe.parent->periodicannouncefrequency;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> qe.last_periodic_announce_sound = 0;</span><br><span> qe.valid_digits = 0;</span><br><span> if (join_queue(args.queuename, &qe, &reason, position)) {</span><br><span>diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample</span><br><span>index 0987236..07b78b3 100644</span><br><span>--- a/configs/samples/queues.conf.sample</span><br><span>+++ b/configs/samples/queues.conf.sample</span><br><span>@@ -278,6 +278,12 @@</span><br><span> ;</span><br><span> ;periodic-announce-frequency=60</span><br><span> ;</span><br><span style="color: hsl(120, 100%, 40%);">+; If enabled, how far into the call should the periodic announcements start.</span><br><span style="color: hsl(120, 100%, 40%);">+; Normally this happens at periodic-announce-frequency into the call, which</span><br><span style="color: hsl(120, 100%, 40%);">+; may not always be desired.</span><br><span style="color: hsl(120, 100%, 40%);">+;</span><br><span style="color: hsl(120, 100%, 40%);">+;periodic-announce-startdelay=10</span><br><span style="color: hsl(120, 100%, 40%);">+;</span><br><span> ; Should the periodic announcements be played in a random order? Default is no.</span><br><span> ;</span><br><span> ;random-periodic-announce=no</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19899">change 19899</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19899"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia79984b6377ef78f167ad9ea2ac084bec29955d0 </div>
<div style="display:none"> Gerrit-Change-Number: 19899 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>