[svn-commits] mnicholson: trunk r230964 - /trunk/apps/app_followme.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 23 16:37:42 CST 2009


Author: mnicholson
Date: Mon Nov 23 16:37:39 2009
New Revision: 230964

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=230964
Log:
Add an option to app_followme to disable the "please hold" announcement.

(closes issue #14155)
Reported by: junky
Patches:
      M14555-trunk.diff uploaded by junky (license 177) (modified)
Tested by: junky

Modified:
    trunk/apps/app_followme.c

Modified: trunk/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_followme.c?view=diff&rev=230964&r1=230963&r2=230964
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Mon Nov 23 16:37:39 2009
@@ -79,6 +79,9 @@
 						<para>Playback the unreachable status message if we've run out
 						of steps to reach the or the callee has elected not to be reachable.</para>
 					</option>
+					<option name="d">
+						<para>Disable the 'Please hold while we try to connect your call' announcement.</para>
+					</option>
 				</optionlist>
 			</parameter>
 		</syntax>
@@ -159,13 +162,15 @@
 enum {
 	FOLLOWMEFLAG_STATUSMSG = (1 << 0),
 	FOLLOWMEFLAG_RECORDNAME = (1 << 1),
-	FOLLOWMEFLAG_UNREACHABLEMSG = (1 << 2)
+	FOLLOWMEFLAG_UNREACHABLEMSG = (1 << 2),
+	FOLLOWMEFLAG_DISABLEHOLDPROMPT = (1 << 3)
 };
 
 AST_APP_OPTIONS(followme_opts, {
 	AST_APP_OPTION('s', FOLLOWMEFLAG_STATUSMSG ),
 	AST_APP_OPTION('a', FOLLOWMEFLAG_RECORDNAME ),
 	AST_APP_OPTION('n', FOLLOWMEFLAG_UNREACHABLEMSG ),
+	AST_APP_OPTION('d', FOLLOWMEFLAG_DISABLEHOLDPROMPT ),
 });
 
 static int ynlongest = 0;
@@ -1095,11 +1100,12 @@
 
 	if (!ast_fileexists(namerecloc, NULL, chan->language))
 		ast_copy_string(namerecloc, "", sizeof(namerecloc));
-
-	if (ast_streamfile(chan, targs.plsholdprompt, chan->language))
-		goto outrun;
-	if (ast_waitstream(chan, "") < 0)
-		goto outrun;
+	if (!ast_test_flag(&targs.followmeflags, FOLLOWMEFLAG_DISABLEHOLDPROMPT)) {
+		if (ast_streamfile(chan, targs.plsholdprompt, chan->language))
+			goto outrun;
+		if (ast_waitstream(chan, "") < 0)
+			goto outrun;
+	}
 	ast_moh_start(chan, S_OR(targs.mohclass, NULL), NULL);
 
 	targs.status = 0;




More information about the svn-commits mailing list