]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 180007 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Tue, 3 Mar 2009 22:49:51 +0000 (22:49 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 3 Mar 2009 22:49:51 +0000 (22:49 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r180007 | mmichelson | 2009-03-03 16:49:07 -0600 (Tue, 03 Mar 2009) | 22 lines

  Merged revisions 180006 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r180006 | mmichelson | 2009-03-03 16:48:18 -0600 (Tue, 03 Mar 2009) | 17 lines

    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.6.1@180009 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c
configs/queues.conf.sample

index 6dfe45702e6ac25d9a81ced370247472fd4c32bd..2b014c769c00e0d2dc406717df03be7207ad412e 100644 (file)
@@ -1782,6 +1782,10 @@ static int play_file(struct ast_channel *chan, const char *filename)
 {
        int res;
 
+       if (ast_strlen_zero(filename)) {
+               return 0;
+       }
+
        ast_stopstream(chan);
 
        res = ast_streamfile(chan, filename, chan->language);
index 00e1703af463ea169106733a2182bff6f1ea2416..d792a99e019c8ccc3bd39819088ccad20a7555fe 100644 (file)
@@ -292,6 +292,13 @@ shared_lastcall=no
 ;
 ; 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