[asterisk-bugs] [Asterisk 0014227]: queue-thankyou should be played only if needed

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Feb 5 18:54:02 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14227 
====================================================================== 
Reported By:                caspy
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   14227
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.2
Asterisk Version:           1.6.0.3-rc1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-13 07:27 CST
Last Modified:              2009-02-05 18:54 CST
====================================================================== 
Summary:                    queue-thankyou should be played only if needed
Description: 
In say_position() in app_queue.c there is a command to play
'queue-thankyou' sound:
  res = play_file(qe->chan, qe->parent->sound_thanks);

This sound is played unconditionally, but should be played only in case if
position or holdtime was played.
Current code is generating 'queue-thankyou' without anything else, for
example, in case of position turned off + holdtime turned on, and hold time
less than a 1 minute.
====================================================================== 

---------------------------------------------------------------------- 
 (0099579) putnopvut (administrator) - 2009-02-05 18:54
 http://bugs.digium.com/view.php?id=14227#c99579 
---------------------------------------------------------------------- 
I tried going with your method for my next effort at this patch, but gcc
issued warnings that avgholdmins and avgholdsecs could be used
uninitialized, so I went to work to make a different version. I've uploaded
the new version as 14227_v3.patch.

In this version, there is a say_thanks variable which governs whether we
play the "thank you" file. By default, it is set to 1. We will set it to 0
if we do not play a hold time, we do have announce-holdtime set, and we
don't have announce-position set.

This way, the thank you sound will play under the following conditions:

1. announcefrequency is set to some value but holdtime and position are
not set to be played.
2. a position announcement was played.
3. a holdtime was played.

It will not play if holdtime is set to be played but we did not actually
announce a holdtime. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-05 18:54 putnopvut      Note Added: 0099579                          
======================================================================




More information about the asterisk-bugs mailing list