fixes holdtime playback issue in app_queue
[asterisk/asterisk.git] / apps / app_queue.c
index d41d272..c9c2473 100644 (file)
@@ -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);
                                                }