diff --git a/README.md b/README.md index 4e6acd671..7cb0c7eb8 100644 --- a/README.md +++ b/README.md @@ -1753,6 +1753,9 @@ call legs, therefore all keys other than `call-id` are currently ignored. If the chosen recording method doesn't support in-kernel packet forwarding, enabling call recording via this messages will force packet forwarding to happen in userspace only. +If the metadata contains the 'output-file' key, then its value will be used +as an output file. Note that a filename extension will not be added. + `stop recording` Message ------------------------- diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 43346be55..323cb8cad 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -150,6 +150,7 @@ static void meta_ptime(metafile_t *mf, unsigned long mnum, int ptime) } static char *get_output_path(metafile_t *mf) { + static const char *of = "output-file"; char *res = NULL; str all_meta; str_init(&all_meta, mf->metadata); @@ -162,8 +163,8 @@ static char *get_output_path(metafile_t *mf) { // key:value separator not found, skip continue; } - if (strncmp(key.s, "output-dir", 10) >= 0) { - ilog(LOG_INFO, "Metadata output-dir found token=%s", token.s); + if (strncmp(key.s, of, strlen(of)) >= 0) { + ilog(LOG_INFO, "Metadata output-file found token=%s", token.s); res = token.s; break; }