summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-11-15 22:38:52 +0000
committerJonathan Rose <jrose@digium.com>2013-11-15 22:38:52 +0000
commit7950118e1895883cfb44d7aacff013d2f759920b (patch)
tree36b5a7499aba83be32d2530f40dd5dfebbff9350 /apps
parent50afe6b9dd65a4294c63a8556ab3efbd202ee465 (diff)
Confbridge: Add option to review the recording similar to announce_join_leave
Review: https://reviewboard.asterisk.org/r/3008/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_confbridge.c34
-rw-r--r--apps/confbridge/conf_config_parser.c10
-rw-r--r--apps/confbridge/include/confbridge.h1
3 files changed, 32 insertions, 13 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 52cb04d15..8347bc6ed 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1508,16 +1508,26 @@ static int conf_rec_name(struct confbridge_user *user, const char *conf_name)
"%s/confbridge-name-%s-%s", destdir,
conf_name, ast_channel_uniqueid(user->chan));
- res = ast_play_and_record(user->chan,
- "vm-rec-name",
- user->name_rec_location,
- 10,
- "sln",
- &duration,
- NULL,
- ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE),
- 0,
- NULL);
+ if (!(ast_test_flag(&user->u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW))) {
+ res = ast_play_and_record(user->chan,
+ "vm-rec-name",
+ user->name_rec_location,
+ 10,
+ "sln",
+ &duration,
+ NULL,
+ ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE),
+ 0,
+ NULL);
+ } else {
+ res = ast_record_review(user->chan,
+ "vm-rec-name",
+ user->name_rec_location,
+ 10,
+ "sln",
+ &duration,
+ NULL);
+ }
if (res == -1) {
user->name_rec_location[0] = '\0';
@@ -1603,7 +1613,9 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
}
/* See if we need them to record a intro name */
- if (!quiet && ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE)) {
+ if (!quiet &&
+ (ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE) ||
+ (ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW)))) {
conf_rec_name(&user, args.conf_name);
}
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index e7a18739c..ec5b0e618 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -110,6 +110,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<configOption name="announce_join_leave">
<synopsis>Prompt user for their name when joining a conference and play it to the conference when they enter</synopsis>
</configOption>
+ <configOption name="announce_join_leave_review">
+ <synopsis>Prompt user for their name when joining a conference and play it to the conference when they enter.
+ The user will be asked to review the recording of their name before entering the conference.</synopsis>
+ </configOption>
<configOption name="pin">
<synopsis>Sets a PIN the user must enter before joining the conference</synopsis>
</configOption>
@@ -1384,8 +1388,9 @@ static char *handle_cli_confbridge_show_user_profile(struct ast_cli_entry *e, in
u_profile.flags & USER_OPT_ANNOUNCEUSERCOUNT ?
"enabled" : "disabled");
ast_cli(a->fd,"Announce join/leave: %s\n",
- u_profile.flags & USER_OPT_ANNOUNCE_JOIN_LEAVE ?
- "enabled" : "disabled");
+ u_profile.flags & (USER_OPT_ANNOUNCE_JOIN_LEAVE | USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW) ?
+ u_profile.flags & USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW ?
+ "enabled (with review)" : "enabled" : "disabled");
ast_cli(a->fd,"Announce User Count all: %s\n",
u_profile.flags & USER_OPT_ANNOUNCEUSERCOUNTALL ?
"enabled" : "disabled");
@@ -2054,6 +2059,7 @@ int conf_load_config(void)
aco_option_register(&cfg_info, "talk_detection_events", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_TALKER_DETECT);
aco_option_register(&cfg_info, "dtmf_passthrough", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_DTMF_PASS);
aco_option_register(&cfg_info, "announce_join_leave", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ANNOUNCE_JOIN_LEAVE);
+ aco_option_register(&cfg_info, "announce_join_leave_review", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW);
aco_option_register(&cfg_info, "pin", ACO_EXACT, user_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct user_profile, pin));
aco_option_register(&cfg_info, "music_on_hold_class", ACO_EXACT, user_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct user_profile, moh_class));
aco_option_register(&cfg_info, "announcement", ACO_EXACT, user_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct user_profile, announcement));
diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h
index 1efefea0b..e3e3642ee 100644
--- a/apps/confbridge/include/confbridge.h
+++ b/apps/confbridge/include/confbridge.h
@@ -59,6 +59,7 @@ enum user_profile_flags {
USER_OPT_DTMF_PASS = (1 << 13), /*!< Sets if dtmf should be passed into the conference or not */
USER_OPT_ANNOUNCEUSERCOUNTALL = (1 << 14), /*!< Sets if the number of users should be announced to everyone. */
USER_OPT_JITTERBUFFER = (1 << 15), /*!< Places a jitterbuffer on the user. */
+ USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW = (1 << 16), /*!< modifies ANNOUNCE_JOIN_LEAVE - user reviews the recording before continuing */
};
enum bridge_profile_flags {