diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 6b7853761..2faf549d0 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -73,7 +73,7 @@ static void meta_stream_interface(metafile_t *mf, unsigned long snum, char *cont if (output_enabled && output_mixed) { pthread_mutex_lock(&mf->mix_lock); if (!mf->mix) { - mf->mix_out = output_new(output_dir, mf->parent, "mix"); + mf->mix_out = output_new(output_dir, mf->parent, "mix", "mix"); if (mix_method == MM_CHANNELS) mf->mix_out->channel_mult = MIX_NUM_INPUTS; mf->mix = mix_new(); diff --git a/recording-daemon/output.c b/recording-daemon/output.c index da67a879b..97ddd1fae 100644 --- a/recording-daemon/output.c +++ b/recording-daemon/output.c @@ -95,7 +95,7 @@ static output_t *output_alloc(const char *path, const char *name) { return ret; } -output_t *output_new(const char *path, const char *call, const char *type) { +output_t *output_new(const char *path, const char *call, const char *type, const char *label) { // construct output file name struct timeval now; struct tm tm; @@ -124,6 +124,9 @@ output_t *output_new(const char *path, const char *call, const char *type) { case 't': g_string_append(f, type); break; + case 'l': + g_string_append(f, label); + break; case 'Y': g_string_append_printf(f, "%04i", tm.tm_year + 1900); break; diff --git a/recording-daemon/output.h b/recording-daemon/output.h index 6ff30322e..759a2f504 100644 --- a/recording-daemon/output.h +++ b/recording-daemon/output.h @@ -10,7 +10,7 @@ extern int mp3_bitrate; void output_init(const char *format); -output_t *output_new(const char *path, const char *call, const char *type); +output_t *output_new(const char *path, const char *call, const char *type, const char *label); output_t *output_new_from_full_path(const char *path, char *name); void output_close(output_t *); diff --git a/recording-daemon/packet.c b/recording-daemon/packet.c index 160a69901..aafe5b3af 100644 --- a/recording-daemon/packet.c +++ b/recording-daemon/packet.c @@ -16,6 +16,7 @@ #include "db.h" #include "streambuf.h" #include "resample.h" +#include "tag.h" static ssize_t ssrc_tls_write(void *, const void *, size_t); @@ -194,7 +195,8 @@ out: else { char buf[16]; snprintf(buf, sizeof(buf), "%08lx", ssrc); - ret->output = output_new(output_dir, mf->parent, buf); + tag_t *tag = tag_get(mf, stream->tag); + ret->output = output_new(output_dir, mf->parent, buf, tag->label); } db_do_stream(mf, ret->output, "single", stream, ssrc); } diff --git a/recording-daemon/rtpengine-recording.pod b/recording-daemon/rtpengine-recording.pod index 992a6d68b..6dbe73291 100644 --- a/recording-daemon/rtpengine-recording.pod +++ b/recording-daemon/rtpengine-recording.pod @@ -166,6 +166,11 @@ The stream type. For B streams this is the SSRC written as hexadecimal; for B stream this is the string B. It is mandatory for the output pattern to include this format sequence. +=item B<%l> + +The label for the participating party as communicated from the controlling +daemon. + =item B<%Y> =item B<%m>