]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Properly play a holdtime message if the announce-holdtime option is
authorMark Michelson <mmichelson@digium.com>
Thu, 12 Jun 2008 18:50:58 +0000 (18:50 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 12 Jun 2008 18:50:58 +0000 (18:50 +0000)
set to "once."

(closes issue #12842)
Reported by: ramonpeek
Patches:
      patch001.diff uploaded by ramonpeek (license 266)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 01fdcf3aa9b278253c5137246c8f5dbfc4055378..23930ae135cffa3131f73b0995d733e88ee6ed67 100644 (file)
@@ -1565,8 +1565,9 @@ static int say_position(struct queue_ent *qe)
 
        /* If the hold time is >1 min, if it's enabled, and if it's not
           supposed to be only once and we have already said it, say it */
-       if ((avgholdmins+avgholdsecs) > 0 && (qe->parent->announceholdtime) &&
-               (!(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE) && qe->last_pos)) {
+    if ((avgholdmins+avgholdsecs) > 0 && qe->parent->announceholdtime &&
+        ((qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE && !qe->last_pos) ||
+        !(qe->parent->announceholdtime == ANNOUNCEHOLDTIME_ONCE))) {
                res = play_file(qe->chan, qe->parent->sound_holdtime);
                if (res)
                        goto playout;