Browse Source

MT#57302 add `exclude-recording` flag

Change-Id: I08cf87ce94720f3e01bfbe3260bdc76da8e1bb63
pull/1675/head
Richard Fuchs 3 years ago
committed by Marco Capetta
parent
commit
5b9d624fae
6 changed files with 27 additions and 0 deletions
  1. +8
    -0
      daemon/call.c
  2. +3
    -0
      daemon/call_interfaces.c
  3. +8
    -0
      daemon/recording.c
  4. +6
    -0
      docs/ng_control_protocol.md
  5. +1
    -0
      include/call.h
  6. +1
    -0
      include/call_interfaces.h

+ 8
- 0
daemon/call.c View File

@ -2810,6 +2810,11 @@ int monologue_offer_answer(struct call_monologue *dialogue[2], GQueue *streams,
__call_monologue_init_from_flags(other_ml, flags);
if (flags->exclude_recording) {
monologue->no_recording = 1;
other_ml->no_recording = 1;
}
__C_DBG("this="STR_FORMAT" other="STR_FORMAT, STR_FMT(&monologue->tag), STR_FMT(&other_ml->tag));
set_transcoding_flag(monologue, other_ml, false);
@ -3072,6 +3077,9 @@ struct call_subscription *call_get_call_subscription(GHashTable *ht, struct call
int monologue_publish(struct call_monologue *ml, GQueue *streams, struct sdp_ng_flags *flags) {
__call_monologue_init_from_flags(ml, flags);
if (flags->exclude_recording)
ml->no_recording = 1;
for (GList *l = streams->head; l; l = l->next) {
struct stream_params *sp = l->data;
struct call_media *media = __get_media(ml, sp, flags, 0);


+ 3
- 0
daemon/call_interfaces.c View File

@ -1034,6 +1034,9 @@ static void call_ng_flags_flags(struct sdp_ng_flags *out, str *s, void *dummy) {
case CSH_LOOKUP("discard-recording"):
out->discard_recording = 1;
break;
case CSH_LOOKUP("exclude-recording"):
out->exclude_recording = 1;
break;
case CSH_LOOKUP("inactive"):
out->inactive = 1;
break;


+ 8
- 0
daemon/recording.c View File

@ -694,6 +694,8 @@ static void stream_pcap_dump(struct media_packet *mp, const str *s) {
}
static void dump_packet_pcap(struct media_packet *mp, const str *s) {
if (mp->media->monologue->no_recording)
return;
struct recording *recording = mp->call->recording;
mutex_lock(&recording->u.pcap.recording_lock);
stream_pcap_dump(mp, s);
@ -893,6 +895,8 @@ static void setup_stream_proc(struct packet_stream *stream) {
return;
if (stream->recording.u.proc.stream_idx != UNINIT_IDX)
return;
if (ml->no_recording)
return;
len = snprintf(buf, sizeof(buf), "TAG %u MEDIA %u TAG-MEDIA %u COMPONENT %u FLAGS %u",
ml->unique_id, media->unique_id, media->index, stream->component,
@ -918,6 +922,8 @@ static void setup_monologue_proc(struct call_monologue *ml) {
if (!recording)
return;
if (ml->no_recording)
return;
append_meta_chunk_str(recording, &ml->tag, "TAG %u", ml->unique_id);
if (ml->label.len)
@ -932,6 +938,8 @@ static void setup_media_proc(struct call_media *media) {
if (!recording)
return;
if (media->monologue->no_recording)
return;
append_meta_chunk_null(recording, "MEDIA %u PTIME %i", media->unique_id, media->ptime);


+ 6
- 0
docs/ng_control_protocol.md View File

@ -818,6 +818,12 @@ Spaces in each string may be replaced by hyphens.
When file recording is in use, instructs the recording daemon to discard
(delete) the recording files, as well as the database entries if present.
* `exclude recording`
Instructs *rtpengine* to exclude this call participant's media from being
recorded. When used within an offer/answer exchange, applies to both call
parties involved.
* `early media`
Used in conjunction with the audio player. If set, audio playback is


+ 1
- 0
include/call.h View File

@ -540,6 +540,7 @@ struct call_monologue {
unsigned int inject_dtmf:1;
unsigned int dtmf_injection_active:1;
unsigned int detect_dtmf:1;
unsigned int no_recording:1;
};
struct call_iterator_list {


+ 1
- 0
include/call_interfaces.h View File

@ -158,6 +158,7 @@ struct sdp_ng_flags {
fragment:1,
record_call:1,
discard_recording:1,
exclude_recording:1,
debug:1,
inactive:1,
loop_protect:1,


Loading…
Cancel
Save