[asterisk-commits] dvossel: branch dvossel/hd_confbridge r311606 - in /team/dvossel/hd_confbridg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 23 11:29:03 CDT 2011
Author: dvossel
Date: Wed Mar 23 11:28:59 2011
New Revision: 311606
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311606
Log:
Intoducing the record_file option in confbridge.conf
Modified:
team/dvossel/hd_confbridge/apps/app_confbridge.c
team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
team/dvossel/hd_confbridge/configs/confbridge.conf.sample
Modified: team/dvossel/hd_confbridge/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/app_confbridge.c?view=diff&rev=311606&r1=311605&r2=311606
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Wed Mar 23 11:28:59 2011
@@ -324,7 +324,6 @@
struct ast_app *mixmonapp = pbx_findapp("MixMonitor");
struct ast_channel *chan;
struct ast_str *filename = ast_str_alloca(128);
- time_t now;
if (!mixmonapp) {
ao2_ref(conference_bridge, -1);
@@ -340,10 +339,15 @@
}
chan = ast_channel_ref(conference_bridge->record_chan);
- time(&now);
- ast_str_append(&filename, 0, "confbridge-%s-%u.wav",
- conference_bridge->name,
- (unsigned int) now);
+ if (!(ast_strlen_zero(conference_bridge->b_profile.rec_file))) {
+ ast_str_append(&filename, 0, "%s", conference_bridge->b_profile.rec_file);
+ } else {
+ time_t now;
+ time(&now);
+ ast_str_append(&filename, 0, "confbridge-%s-%u.wav",
+ conference_bridge->name,
+ (unsigned int) now);
+ }
ao2_unlock(conference_bridge);
ast_answer(chan);
Modified: team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c?view=diff&rev=311606&r1=311605&r2=311606
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c Wed Mar 23 11:28:59 2011
@@ -277,6 +277,8 @@
if (sscanf(value, "%30u", &b_profile->max_members) != 1) {
return -1;
}
+ } else if (!strcasecmp(name, "record_file")) {
+ ast_copy_string(b_profile->rec_file, value, sizeof(b_profile->rec_file));
} else if (strlen(name) >= 5 && !strncasecmp(name, "sound", 5)) {
if (set_sound(name, value, b_profile->sounds)) {
return -1;
@@ -432,6 +434,7 @@
b_profile->internal_sample_rate = 0;
b_profile->flags = 0;
b_profile->max_members = 0;
+ memset(b_profile->rec_file, 0, sizeof(b_profile->rec_file));
ao2_ref(b_profile->sounds, -1); /* sounds is read only. Once it has been created
* it can never be altered. This prevents having to
* do any locking after it is built from the config. */
@@ -864,6 +867,9 @@
ast_cli(a->fd,"Record Conference: %s\n",
b_profile.flags & BRIDGE_OPT_RECORD_CONFERENCE ?
"yes" : "no");
+ ast_cli(a->fd,"Record File: %s\n",
+ ast_strlen_zero(b_profile.rec_file) ? "Auto Generated" :
+ b_profile.rec_file);
if (b_profile.max_members) {
ast_cli(a->fd,"Max Members: %d\n", b_profile.max_members);
} else {
Modified: team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h?view=diff&rev=311606&r1=311605&r2=311606
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h Wed Mar 23 11:28:59 2011
@@ -163,6 +163,7 @@
struct bridge_profile {
char name[64];
+ char rec_file[512];
unsigned int flags;
unsigned int max_members; /*!< The maximum number of participants allowed in the conference */
unsigned int internal_sample_rate; /*!< The internal sample rate of the bridge. 0 when set to auto adjust mode. */
Modified: team/dvossel/hd_confbridge/configs/confbridge.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/configs/confbridge.conf.sample?view=diff&rev=311606&r1=311605&r2=311606
==============================================================================
--- team/dvossel/hd_confbridge/configs/confbridge.conf.sample (original)
+++ team/dvossel/hd_confbridge/configs/confbridge.conf.sample Wed Mar 23 11:28:59 2011
@@ -73,6 +73,15 @@
; 'confbridge-<name of conference bridge>-<start time>.wav
; and the default format is 8khz slinear. This file will be
; located in the configured monitoring directory in asterisk.conf.
+
+;record_file=</path/to/file> ; When record_conference is set to yes, the specific name of the
+ ; record file can be set using this option. Note that since multiple
+ ; conferences may use the same bridge profile, this may cause issues
+ ; depending on the configuration. It is recommended to only use this
+ ; option dynamically with the CONFBRIDGE() dialplan function. This
+ ; allows the record name to be specified and a unique name to be chosen.
+ ; By default, the record_file is stored in Asterisk's spool/monitor directory
+ ; with a unique filename starting with the 'confbridge' prefix.
;internal_sample_rate=auto ; Sets the internal native sample rate the
; conference is mixed at. This is set to automatically
More information about the asterisk-commits
mailing list