From: David Vossel Date: Tue, 5 Jan 2010 23:08:50 +0000 (+0000) Subject: fixes holdtime playback issue in app_queue X-Git-Tag: 11.0.0-beta1~3659 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfae8dca78aa3b2272de74a1260d42d876ca69e8;p=thirdparty%2Fasterisk.git fixes holdtime playback issue in app_queue When reporting hold time, the number of seconds should be mod 60. Otherwise audio playback could be something like "2 minutes 123 seconds" rather than "2 minutes 3 seconds". Also, the "minute" sound file is missing, so for the moment until that file can be created the "minutes" file is used instead. (closes issue #16168) Reported by: nickilo Patches: patch-unified-trunk-rev-222176 uploaded by nickilo (license ) Tested by: nickilo, wonderg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237920 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index d41d27295d..c9c2473a22 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4335,11 +4335,8 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce time(&now); holdtime = abs((now - qe->start) / 60); - holdtimesecs = abs((now - qe->start)); - if (holdtime == 1) { - ast_say_number(peer, holdtime, AST_DIGIT_ANY, peer->language, NULL); - play_file(peer, qe->parent->sound_minute); - } else { + holdtimesecs = abs((now - qe->start) % 60); + if (holdtime > 0) { ast_say_number(peer, holdtime, AST_DIGIT_ANY, peer->language, NULL); play_file(peer, qe->parent->sound_minutes); }