[asterisk-commits] rmudgett: trunk r400744 - in /trunk: ./ apps/ apps/confbridge/ apps/confbridg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 8 15:18:39 CDT 2013
Author: rmudgett
Date: Tue Oct 8 15:18:37 2013
New Revision: 400744
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400744
Log:
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
........
Merged revisions 400741 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 400742 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/CHANGES
trunk/apps/app_confbridge.c
trunk/apps/confbridge/conf_config_parser.c
trunk/apps/confbridge/include/confbridge.h
trunk/configs/confbridge.conf.sample
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=400744&r1=400743&r2=400744
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Oct 8 15:18:37 2013
@@ -160,6 +160,10 @@
* Added a new option for conference recording, record_file_append. If enabled,
when the recording is stopped and then re-started, the existing recording
will be used and appended to.
+
+ * 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.
ControlPlayback
------------------
Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=400744&r1=400743&r2=400744
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Tue Oct 8 15:18:37 2013
@@ -1339,6 +1339,9 @@
return -1;
}
+ /* To make sure playback_chan has the same language of that profile */
+ ast_channel_language_set(conference->playback_chan, conference->b_profile.language);
+
ast_debug(1, "Created announcer channel '%s' to conference bridge '%s'\n",
ast_channel_name(conference->playback_chan), conference->name);
return 0;
Modified: trunk/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_config_parser.c?view=diff&rev=400744&r1=400743&r2=400744
==============================================================================
--- trunk/apps/confbridge/conf_config_parser.c (original)
+++ trunk/apps/confbridge/conf_config_parser.c Tue Oct 8 15:18:37 2013
@@ -255,6 +255,15 @@
sample rate is set that Asterisk does not support, the
closest sample rate Asterisk does support to the one requested
will be used.
+ </para></description>
+ </configOption>
+ <configOption name="language" default="en">
+ <synopsis>The language used for announcements to the conference.</synopsis>
+ <description><para>
+ By default, announcements to a conference use English. Which means
+ the prompts played to all users within the conference will be
+ English. By changing the language of a bridge, this will change
+ the language of the prompts played to all users.
</para></description>
</configOption>
<configOption name="mixing_interval">
@@ -1417,6 +1426,7 @@
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);
@@ -1934,6 +1944,7 @@
aco_option_register(&cfg_info, "record_file_append", ACO_EXACT, bridge_types, "yes", OPT_BOOLFLAG_T, 1, FLDSET(struct bridge_profile, flags), BRIDGE_OPT_RECORD_FILE_APPEND);
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);
Modified: trunk/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/include/confbridge.h?view=diff&rev=400744&r1=400743&r2=400744
==============================================================================
--- trunk/apps/confbridge/include/confbridge.h (original)
+++ trunk/apps/confbridge/include/confbridge.h Tue Oct 8 15:18:37 2013
@@ -192,6 +192,7 @@
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 */
Modified: trunk/configs/confbridge.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/confbridge.conf.sample?view=diff&rev=400744&r1=400743&r2=400744
==============================================================================
--- trunk/configs/confbridge.conf.sample (original)
+++ trunk/configs/confbridge.conf.sample Tue Oct 8 15:18:37 2013
@@ -196,6 +196,9 @@
; first_marked: The first marked user to join the conference with video capabilities
; is the single source of video distribution among all participants. If
; that user leaves, the marked user to join after them becomes the source.
+
+;language=en ; Set the language used for announcements to the conference.
+ ; Default is en (English).
; All sounds in the conference are customizable using the bridge profile options below.
; Simply state the option followed by the filename or full path of the filename after
More information about the asterisk-commits
mailing list