From: Mark Michelson Date: Tue, 3 Mar 2009 22:48:18 +0000 (+0000) Subject: Clarify some documentation of queues.conf.sample X-Git-Tag: 1.4.24-rc1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab5b88843c2ba3ee1bb26fd63b1b2e8dfa3f7859;p=thirdparty%2Fasterisk.git Clarify some documentation of queues.conf.sample It had always been possible to explicitly specify a "blank" value for a sound file in queues.conf and have no sound played back. The problem with this is that it would result in some ugly CLI warnings from file.c. This commit introduces a check when playing a file in app_queue to see if the name of the file is zero-length and return early if that is the case. Also, the ability to specify the blank sound files in queues.conf is now mentioned more clearly in queues.conf.sample (closes issue #14227) Reported by: caspy git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180006 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 18ec1df88c..efb789ebe7 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1486,6 +1486,10 @@ static int play_file(struct ast_channel *chan, char *filename) { int res; + if (ast_strlen_zero(filename)) { + return 0; + } + ast_stopstream(chan); res = ast_streamfile(chan, filename, chan->language); diff --git a/configs/queues.conf.sample b/configs/queues.conf.sample index 53900e29ef..64f6985273 100644 --- a/configs/queues.conf.sample +++ b/configs/queues.conf.sample @@ -155,6 +155,13 @@ monitor-type = MixMonitor ; ; Use these sound files in making position/holdtime announcements. The ; defaults are as listed below -- change only if you need to. +; +; Keep in mind that you may also prevent a sound from being played if you +; explicitly set a sound to be an empty string. For example, if you want to +; prevent the queue from playing queue-thankyou, you may set the sound using +; the following line: +; +; queue-thankyou= ; ; ("You are now first in line.") ;queue-youarenext = queue-youarenext