Browse Source

Minorly adjusted the recording metadata file format

In the recording metadata files, we now separate each logical section of
metadata by two blank lines. So, it goes:

1. the PCAP file URL
2. two blank lines
3. all answer SDP, each separated by one blank line
4. two blank lines
5. start timestamp
6. end timestamp (no blank line in between)
7. the rest of the file is unstructured metadata (any number of lines)
pull/245/head
Dylan Mikus 10 years ago
committed by Eric Green
parent
commit
adb6193891
3 changed files with 25 additions and 5 deletions
  1. +17
    -2
      README.md
  2. +3
    -3
      daemon/recording.c
  3. +5
    -0
      daemon/recording.h

+ 17
- 2
README.md View File

@ -474,13 +474,28 @@ The options are described in more detail below.
/path/to/recording-pcap.pcap
first SDP answer
second SDP answer
...
n-th and final SDP answer
start timestamp (YYYY-MM-DDThh:mm:ss)
end timestamp (YYYY-MM-DDThh:mm:ss)
generic metadata
Metadata files will appear in the subdirectory when the call completes.
PCAP files will be written to the subdirectory as the call is being recorded.
There are two empty lines between each logic block of metadata.
We write out all answer SDP, each separated from one another by one empty
line. The generic metadata at the end can be any length with any number of
lines. Metadata files will appear in the subdirectory when the call
completes. PCAP files will be written to the subdirectory as the call is
being recorded.
A typical command line (enabling both UDP and NG protocols) thus may look like:


+ 3
- 3
daemon/recording.c View File

@ -147,7 +147,7 @@ str *init_write_pcap_file(struct call *call) {
if (pcap_path != NULL && call->recording->recording_pdumper != NULL
&& call->recording->meta_fp) {
// Write the location of the PCAP file to the metadata file
fprintf(call->recording->meta_fp, "%s\n", pcap_path->s);
fprintf(call->recording->meta_fp, "%s\n\n", pcap_path->s);
}
}
@ -219,13 +219,13 @@ int meta_finish_file(struct call *call) {
}
timeinfo = localtime(&start);
strftime(timebuffer, 20, "%FT%T", timeinfo);
fprintf(recording->meta_fp, "\n%s\n", timebuffer);
fprintf(recording->meta_fp, "\n\n%s\n", timebuffer);
timeinfo = localtime(&end);
strftime(timebuffer, 20, "%FT%T", timeinfo);
fprintf(recording->meta_fp, "%s\n", timebuffer);
// Print metadata
fprintf(recording->meta_fp, "\n%s\n", recording->metadata->s);
fprintf(recording->meta_fp, "\n\n%s\n", recording->metadata->s);
free(recording->metadata);
fclose(recording->meta_fp);


+ 5
- 0
daemon/recording.h View File

@ -51,6 +51,7 @@ int detect_setup_recording(struct call *call, str recordcall);
*
* /path/to/recording-pcap.pcap
*
*
* first SDP answer
*
* second SDP answer
@ -59,11 +60,15 @@ int detect_setup_recording(struct call *call, str recordcall);
*
* n-th and final SDP answer
*
*
* start timestamp (YYYY-MM-DDThh:mm:ss)
* end timestamp (YYYY-MM-DDThh:mm:ss)
*
*
* generic metadata
*
* There are two empty lines between each logic block of metadata.
* The generic metadata at the end can be any length with any number of lines.
* Temporary files go in /tmp/. They will end up in
* ${RECORDING_DIR}/metadata/. They are named like:
* ${CALL_ID}-${RAND-HEX}.pcap


Loading…
Cancel
Save