Browse Source

调整confbridge录音存储

Yu.ding 5 years ago
parent
commit
b5e58e2804
1 changed files with 10 additions and 2 deletions
  1. 10 2
      apps/app_confbridge.c

+ 10 - 2
apps/app_confbridge.c

@@ -658,6 +658,7 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
 {
 	char *rec_file = conference->b_profile.rec_file;
 	char *ext;
+    char filename_tmp[RECORD_FILENAME_INITIAL_SPACE];
 	time_t now;
 
 	if (ast_str_strlen(*filename)
@@ -670,8 +671,11 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
 
 	ast_str_reset(*filename);
 	if (ast_strlen_zero(rec_file)) {
-		ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name,
+    	bzero(&filename_tmp, sizeof (filename_tmp));
+		sprintf(filename_tmp,"conf/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, "%s", filename_tmp);
 	} else {
 		/* insert time before file extension */
 		ext = strrchr(rec_file, '.');
@@ -683,7 +687,11 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
 		}
 	}
 	if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
-		ast_str_append(filename, 0, ",a");
+		//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);
 	}
 }