|
@@ -657,7 +657,7 @@ static void send_unmute_event(struct confbridge_user *user, struct confbridge_co
|
|
|
static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
|
|
|
{
|
|
|
char *rec_file = conference->b_profile.rec_file;
|
|
|
- char *ext;
|
|
|
+ //char *ext;
|
|
|
char filename_tmp[RECORD_FILENAME_INITIAL_SPACE];
|
|
|
time_t now;
|
|
|
|
|
@@ -672,26 +672,36 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
|
|
|
ast_str_reset(*filename);
|
|
|
if (ast_strlen_zero(rec_file)) {
|
|
|
bzero(&filename_tmp, sizeof (filename_tmp));
|
|
|
- sprintf(filename_tmp,"conf/conference-%s-%u.wav", conference->name,
|
|
|
+ sprintf(filename_tmp,"conference/conference-%s-%u.wav", conference->name,
|
|
|
(unsigned int) now);
|
|
|
- //ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name, //change by dingyu
|
|
|
+ //ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name,(unsigned int) now); //change by dingyu
|
|
|
ast_str_set(filename, 0, "%s", filename_tmp);
|
|
|
} else {
|
|
|
/* insert time before file extension */
|
|
|
+ bzero(&filename_tmp, sizeof (filename_tmp));
|
|
|
+ strcpy(filename_tmp,rec_file);
|
|
|
+ ast_str_set(filename, 0, "%s", filename_tmp);
|
|
|
+ /*
|
|
|
ext = strrchr(rec_file, '.');
|
|
|
if (ext) {
|
|
|
- ast_str_set_substr(filename, 0, rec_file, ext - rec_file);
|
|
|
- ast_str_append(filename, 0, "-%u%s", (unsigned int) now, ext);
|
|
|
+ //ast_str_set_substr(filename, 0, rec_file, ext - rec_file); //change by dingyu
|
|
|
+ //ast_str_append(filename, 0, "-%u%s", (unsigned int) now, ext); //change by dingyu
|
|
|
+ substr(filename_tmp, rec_file, ext - rec_file);
|
|
|
+ sprintf(filename_tmp, "%s-%u%s",filename_tmp, (unsigned int) now, ext);
|
|
|
+ ast_str_set(filename, 0, "%s", filename_tmp);
|
|
|
} else {
|
|
|
- ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int) now);
|
|
|
- }
|
|
|
+ sprintf(filename_tmp, "%s-%u", rec_file, (unsigned int) now);
|
|
|
+ ast_str_set(filename, 0, "%s", filename_tmp);
|
|
|
+ //ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int) now); //change by dingyu
|
|
|
+ }
|
|
|
+ */
|
|
|
}
|
|
|
if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
|
|
|
- //ast_str_append(filename, 0, ",a"); //change by dingyu
|
|
|
- ast_str_append(filename, 0, ",a,/etc/scripts/confbridge_storage.sh /var/spool/asterisk/monitor/%s",filename_tmp);
|
|
|
- }
|
|
|
- else{
|
|
|
- ast_str_append(filename, 0, ",,/etc/scripts/confbridge_storage.sh /var/spool/asterisk/monitor/%s",filename_tmp);
|
|
|
+ ast_str_append(filename, 0, ",a"); //change by dingyu
|
|
|
+// ast_str_append(filename, 0, ",a,/etc/scripts/confbridge_storage.sh /var/spool/asterisk/monitor/%s",filename_tmp);
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// ast_str_append(filename, 0, ",,/etc/scripts/confbridge_storage.sh /var/spool/asterisk/monitor/%s",filename_tmp);
|
|
|
}
|
|
|
}
|
|
|
|