]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 237920 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Tue, 5 Jan 2010 23:09:55 +0000 (23:09 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 5 Jan 2010 23:09:55 +0000 (23:09 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r237920 | dvossel | 2010-01-05 17:08:50 -0600 (Tue, 05 Jan 2010) | 16 lines

  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/branches/1.6.1@237922 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index b546845c19d3ccbefdc998f41f1e4a9dbd88b041..519e2d70a6f652aabb265af3f85d4c99f334af4e 100644 (file)
@@ -3703,11 +3703,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);
                                                }