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;
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
participants in the conference bridge. If disabled then no text
messages are sent to the user.</para></description>
</configOption>
+ <configOption name="answer_channel" default="yes">
+ <synopsis>Sets if a user's channel should be answered if currently unanswered.</synopsis>
+ </configOption>
</configObject>
<configObject name="bridge_profile">
<synopsis>A named profile to apply to specific bridges.</synopsis>
ast_cli(a->fd,"Announce User Count all: %s\n",
u_profile.flags & USER_OPT_ANNOUNCEUSERCOUNTALL ?
"enabled" : "disabled");
- ast_cli(a->fd,"Text Messaging: %s\n",
- u_profile.flags & USER_OPT_TEXT_MESSAGING ?
- "enabled" : "disabled");
+ ast_cli(a->fd,"Text Messaging: %s\n",
+ u_profile.flags & USER_OPT_TEXT_MESSAGING ?
+ "enabled" : "disabled");
+ ast_cli(a->fd,"Answer Channel: %s\n",
+ u_profile.flags & USER_OPT_ANSWER_CHANNEL ?
+ "true" : "false");
ast_cli(a->fd, "\n");
return CLI_SUCCESS;
aco_option_register(&cfg_info, "jitterbuffer", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_JITTERBUFFER);
aco_option_register(&cfg_info, "timeout", ACO_EXACT, user_types, "0", OPT_UINT_T, 0, FLDSET(struct user_profile, timeout));
aco_option_register(&cfg_info, "text_messaging", ACO_EXACT, user_types, "yes", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_TEXT_MESSAGING);
+ aco_option_register(&cfg_info, "answer_channel", ACO_EXACT, user_types, "yes", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ANSWER_CHANNEL);
/* This option should only be used with the CONFBRIDGE dialplan function */
aco_option_register_custom(&cfg_info, "template", ACO_EXACT, user_types, NULL, user_template_handler, 0);