diff --git a/apps/app_bridgewait.c b/apps/app_bridgewait.c index 9326ed14fb..86a4f7b10c 100644 --- a/apps/app_bridgewait.c +++ b/apps/app_bridgewait.c @@ -100,6 +100,9 @@ Automatically exit the bridge and return to the PBX after duration seconds. + @@ -108,7 +111,7 @@ The channel will then wait in the holding bridge until some event occurs which removes it from the holding bridge. This application will answer calls which haven't already - been answered. + been answered, unless the n option is provided. ***/ @@ -186,6 +189,7 @@ enum bridgewait_flags { MUXFLAG_MOHCLASS = (1 << 0), MUXFLAG_ENTERTAINMENT = (1 << 1), MUXFLAG_TIMEOUT = (1 << 2), + MUXFLAG_NOANSWER = (1 << 3), }; enum bridgewait_args { @@ -199,6 +203,7 @@ AST_APP_OPTIONS(bridgewait_opts, { AST_APP_OPTION_ARG('e', MUXFLAG_ENTERTAINMENT, OPT_ARG_ENTERTAINMENT), AST_APP_OPTION_ARG('m', MUXFLAG_MOHCLASS, OPT_ARG_MOHCLASS), AST_APP_OPTION_ARG('S', MUXFLAG_TIMEOUT, OPT_ARG_TIMEOUT), + AST_APP_OPTION('n', MUXFLAG_NOANSWER), }); static int bridgewait_timeout_callback(struct ast_bridge_channel *bridge_channel, void *hook_pvt) @@ -458,7 +463,7 @@ static int bridgewait_exec(struct ast_channel *chan, const char *data) } /* Answer the channel if needed */ - if (ast_channel_state(chan) != AST_STATE_UP) { + if (ast_channel_state(chan) != AST_STATE_UP && !ast_test_flag(&flags, MUXFLAG_NOANSWER)) { ast_answer(chan); } diff --git a/doc/CHANGES-staging/app_bridgewait.txt b/doc/CHANGES-staging/app_bridgewait.txt new file mode 100644 index 0000000000..aa2e00be9a --- /dev/null +++ b/doc/CHANGES-staging/app_bridgewait.txt @@ -0,0 +1,4 @@ +Subject: app_bridgewait + +Adds the n option to not answer the channel when +the BridgeWait application is called.