From: Matthew Nicholson Date: Mon, 23 Nov 2009 22:37:39 +0000 (+0000) Subject: Add an option to app_followme to disable the "please hold" announcement. X-Git-Tag: 11.0.0-beta1~3835 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=606276ec483aabb9aea47e56ffb6c90792d3b617;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230964 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_followme.c b/apps/app_followme.c index db2d984b72..b8ee480d1f 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -79,6 +79,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Playback the unreachable status message if we've run out of steps to reach the or the callee has elected not to be reachable. + @@ -159,13 +162,15 @@ struct findme_user { 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 @@ static int app_exec(struct ast_channel *chan, const char *data) 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;