If recording-method is pcap, then proc is zero-initialized, so
meta_filepath is empty. This shows many logs such as:
[core] Failed to open recording metadata file '(null)' for writing: Bad address
Prevent them by returning earlier.
Closes#1889
Change-Id: Ifeb3038f9a5c0bd6a9b7dd92842dd61783b40263
(cherry picked from commit 759fd72dc6)
Distinguish between functions that enagage or disengage the recording
daemon and functions acting on actual recording, which eliminates the
need to deal with the flags separately.
Change-Id: Ia2d718d9e6f95d7621a2ba186c60b501f7404fe7
Handle the `output-destination` flag in the same way as the `metadata`
flag, eliminating the need to do it explicitly everywhere it's relevant.
Add a few alternative spellings of `output-destination`.
Rename the member from flags to `recording_file` to make it more clear
what it is.
Add save/restore capabilities of that field to the Redis code.
Unify printing of monologue LABEL into the same function that handles
the metadata.
Update documentation to better explain this option, and use the new
clearer name.
Change-Id: I4496341013b0ccab5b1dec026cf3a1a0ea879018
Use a generic function to update call/monologue fields from a given
string, and print an update to the recording metafile.
Functional no-op.
Change-Id: I23dbfff0646145809c37ee9270bce6983b136dcc
Move the code generating the recording metafile prefix out of the
"externally" visible code and logically deeper into recording.c.
Move the field from the recording struct into the call struct so that it
can be directly restored from Redis, and eliminate and mostly unused
function argument in the process.
Functional no-op.
Change-Id: I31eb3cd5864dd8138fabad0bcbd08ef18571f1a9
Switch the start/stop/etc recording methods to parse out the full
message dictionary into a sdp_ng_flags like all other methods, and then
pass the sdp_ng_flags object to update_metadata_*() for a unified
recording setup function.
Functional no-op.
Change-Id: Iad1004981808c45973bfd9bc2dc6c461acc602cc
In the file implementations follow the rules:
1. Firstly goes the correlated header file, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. Thirdly, go custom header files, so in double quotes,
then one empty row.
4. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
5. If there are pre-processor definitions, they are added.
6. And eventually at least one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on the sequence,
and also possibly on some inline objects definitions, but if possible
to follow the rules, it's being done.
Change-Id: Ie512a970e230fe202398656d1942e8874bb14cd9
Make it possible to set output-destination immediately when starting the
reording, not only afterwards.
Closes#1667
Change-Id: Idb7de770ad5a41d6ae6055784213e7983df9bfec
When the `discard-recording` flag is given in one of the commands to
rtpengine (e.g. in the `delete` command), the metafile is renamed to a
.DISCARD suffix and then deleted.
The recording daemon then, seeing the .DISCARD suffix, proceeds to
immediately close all recordings, delete the files if any, and delete
the entries from the DB.
Change-Id: I3f0cac129f2d56cbccd770d43bf434dea6c0a0db
These are two different file paths and each belongs to its respective
recording method. Move them into the appropriate struct. Also use
g_clear_pointer() for memory bookkeeping.
Change-Id: I25a897636d4f6e8fea3c533f9ca39c90f81390f8
The unified `rtpengine_message` struct has become quite large, and most
fields are not used for most of the messages sent to the kernel module.
Use command-specific structures that only contain the required
information. Adapt the I/O code and the size checks to use the correct
sizes.
Do special handling for GET_*_STATS as these commands do both input and
output at the same time. Copy in only the input portion of the struct.
(Copy-out still copies the entire struct at this point.)
Change-Id: Ia8aec6135fd7de42ae4e62e7f2dc23804e1f0914
This prevents empty mixed output files from being created when mixed
output is enabled in the config but recording isn't active for that
call.
Change-Id: I66ead89dc8a7ea80b81164b3e24d997b0df5f37e
commit d15fd4a547
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Tue Jul 6 14:07:42 2021 +0200
Also free the character data.
commit 8869187215
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Mon Jul 5 16:11:32 2021 +0200
Make documentation and parameters consistant.
commit 4b15aea2ee
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jun 10 15:34:00 2021 +0200
Update documentation.
commit 6ec1b3035d
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jun 10 15:33:12 2021 +0200
Do not use metadata for setting the recording file; use output_destination instead.
commit f65a76e8a3
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Wed Jun 9 15:56:02 2021 +0200
Only append file extension if skip_filename_extension is not set.
commit 92e9d7c679
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Wed Jun 9 14:12:48 2021 +0200
Rename the option to better match its usage.
commit 11128bff49
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Wed Jun 9 13:19:10 2021 +0200
Implement support for seting an output file and folder per recording.
Change-Id: I1579d62467eaf06a7aa1ac11e59dbb374f150deb
Complete overhaul of the codec handling code:
*) obsolete flags `asymmetric codecs`, `symmetric codecs`, `reorder
codecs`
*) support proper codec offer/answer
*) split codec manipulation (strip/offer/accept/etc) into separate
functions for clarity and better code maintenance
*) fully update codec handlers in both directions after an answer
*) explicit allocation and handling of codecs and payload types in a
codec_store object
*) improve codec matchup logic during answer
*) more explicit handling of supplemental codecs (CN/DTMF)
*) remove now obsolete hacks for handling certain use cases
Change-Id: I996705ba8fe339524c2f70e6bb0fd854f9a1f4fb
This makes the type in line with string(3) functions and eliminates some
compiler warnings.
Also update the related bencode data type.
Change-Id: I7ef4024f4b5a0f737b3dbe03bcd078032395bce6