[Home]

Summary:ASTERISK-09237: announce-round-seconds > 30 doesn't make sense
Reporter:pkempgen (pkempgen)Labels:
Date Opened:2007-04-10 11:30:46Date Closed:2007-05-14 13:09:31
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The queues.conf setting announce-round-seconds allows a value from 0 to 59,
see apps/app_queue.c:

if (q->roundingseconds>60 || q->roundingseconds<0) {

but rounding to seconds > 30 doesn't really make sense. So this should be
changed to allow 30 as a maximum. configs/queues.conf.sample should tell the
user to enter one of 1,5,10,15,30 or 0 for no seconds.

****** ADDITIONAL INFORMATION ******

Apart from that it seems like with announce-round-seconds=30 a holdtime of
6:29 would be announced as 6 minutes. Is this the desired behavior? (Should
probably go in a separate bug report if considered a bug.)
Comments:By: pkempgen (pkempgen) 2007-04-10 11:41:18

To be correct, a value from 0 to 60 is currently allowed. :)

By: Jason Parker (jparker) 2007-05-14 12:00:11

I don't think I understand the problem here.  Can you give more some more detail?

By: pkempgen (pkempgen) 2007-05-14 12:50:12

Don't really remember how the calculation is done in the source code
but I'll try to explain:

Rounding the hold time seconds to multiples of 1, 5, 10, 15 or 30
leads to meaningful values. The purpose of announcing "30 secs"
instead of "32 secs" is shorter announcements, easily understandable
by the caller and not to be overly precise.

Rounding a hold time of ie. 321 seconds to multiples of 51 seconds
just doesn't make sense to me. What should you expect as a user of
Asterisk? Is x:51 the threshold used for rounding? Is the calculation
done like this:

floor(321/10) = 32,  32*10 = 320   => announce 5:20
floor(321/12) = 26,  26*12 = 312   => announce 5:12 ???
floor(321/20) = 10,  16*20 = 320   => announce 5:20
floor(321/30) = 10,  10*30 = 300   => announce 5:00
floor(321/51) =  6,   6*51 = 306   => announce 5:06 ???

round(321/10) = 32,  32*10 = 320   => announce 5:20
round(321/12) = 27,  27*12 = 324   => announce 5:24 ???
round(321/20) = 10,  16*20 = 320   => announce 5:20
round(321/30) = 11,  11*30 = 330   => announce 5:30
round(321/51) =  6,   6*51 = 306   => announce 5:06 ???

Why would announcing 5:12, 5:24 or 5:06 be any better than 5:21?



By: Jason Parker (jparker) 2007-05-14 13:09:31

Okay, I see your point.  This has been fixed in svn trunk in revision 64263.