mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
app_confbridge: Can now set the language used for announcements to the conference.
ConfBridge now has the ability to set the language of announcements to the
conference. The language can be set on a bridge profile in
confbridge.conf or by the dialplan function
CONFBRIDGE(bridge,language)=en.
(closes issue ASTERISK-19983)
Reported by: Jonathan White
Patches:
M19983_rev2.diff (license #5138) patch uploaded by junky (modified)
Tested by: rmudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1342,6 +1342,9 @@ static int alloc_playback_chan(struct conference_bridge *conference_bridge)
|
||||
|
||||
ast_channel_internal_bridge_set(conference_bridge->playback_chan, conference_bridge->bridge);
|
||||
|
||||
/* To make sure playback_chan has the same language of that profile */
|
||||
ast_channel_language_set(conference_bridge->playback_chan, conference_bridge->b_profile.language);
|
||||
|
||||
if (ast_call(conference_bridge->playback_chan, "", 0)) {
|
||||
ast_hangup(conference_bridge->playback_chan);
|
||||
conference_bridge->playback_chan = NULL;
|
||||
|
||||
@@ -852,6 +852,7 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
|
||||
|
||||
ast_cli(a->fd,"--------------------------------------------\n");
|
||||
ast_cli(a->fd,"Name: %s\n", b_profile.name);
|
||||
ast_cli(a->fd,"Language: %s\n", b_profile.language);
|
||||
|
||||
if (b_profile.internal_sample_rate) {
|
||||
snprintf(tmp, sizeof(tmp), "%d", b_profile.internal_sample_rate);
|
||||
@@ -1364,6 +1365,7 @@ int conf_load_config(void)
|
||||
aco_option_register_custom(&cfg_info, "video_mode", ACO_EXACT, bridge_types, NULL, video_mode_handler, 0);
|
||||
aco_option_register(&cfg_info, "max_members", ACO_EXACT, bridge_types, "0", OPT_UINT_T, 0, FLDSET(struct bridge_profile, max_members));
|
||||
aco_option_register(&cfg_info, "record_file", ACO_EXACT, bridge_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, rec_file));
|
||||
aco_option_register(&cfg_info, "language", ACO_EXACT, bridge_types, "en", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, language));
|
||||
aco_option_register_custom(&cfg_info, "^sound_", ACO_REGEX, bridge_types, NULL, sound_option_handler, 0);
|
||||
/* This option should only be used with the CONFBRIDGE dialplan function */
|
||||
aco_option_register_custom(&cfg_info, "template", ACO_EXACT, bridge_types, NULL, bridge_template_handler, 0);
|
||||
|
||||
@@ -191,6 +191,7 @@ struct bridge_profile_sounds {
|
||||
|
||||
struct bridge_profile {
|
||||
char name[64];
|
||||
char language[MAX_LANGUAGE]; /*!< Language used for playback_chan */
|
||||
char rec_file[PATH_MAX];
|
||||
unsigned int flags;
|
||||
unsigned int max_members; /*!< The maximum number of participants allowed in the conference */
|
||||
|
||||
Reference in New Issue
Block a user