mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +00:00
app_confbridge: New option to prevent answer supervision
A new user option, answer_channel, adds the capability to prevent answering the channel if it hasn't already been answered yet. ASTERISK-29440 Change-Id: I26642729d0345f178c7b8045506605c8402de54b
This commit is contained in:
committed by
Friendly Automation
parent
8e2672d2a4
commit
a861522467
@@ -2535,10 +2535,6 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
|
||||
AST_APP_ARG(menu_profile_name);
|
||||
);
|
||||
|
||||
if (ast_channel_state(chan) != AST_STATE_UP) {
|
||||
ast_answer(chan);
|
||||
}
|
||||
|
||||
if (ast_bridge_features_init(&user.features)) {
|
||||
pbx_builtin_setvar_helper(chan, "CONFBRIDGE_RESULT", "FAILED");
|
||||
res = -1;
|
||||
@@ -2588,6 +2584,11 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
|
||||
goto confbridge_cleanup;
|
||||
}
|
||||
|
||||
/* If channel hasn't been answered already, answer it, unless we're explicitly not supposed to */
|
||||
if ((ast_channel_state(chan) != AST_STATE_UP) && (ast_test_flag(&user.u_profile, USER_OPT_ANSWER_CHANNEL))) {
|
||||
ast_answer(chan);
|
||||
}
|
||||
|
||||
quiet = ast_test_flag(&user.u_profile, USER_OPT_QUIET);
|
||||
|
||||
/* ask for a PIN immediately after finding user profile. This has to be
|
||||
|
Reference in New Issue
Block a user