MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / rtpproxy_stop_recording_leg

Function rtpproxy_stop_recording_leg

modules/rtpproxy/rtpproxy.c:5997–6021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5995}
5996
5997static int rtpproxy_stop_recording_leg(struct rtpproxy_copy_ctx *ctx,
5998 struct rtpp_args *args, str *flags, int leg)
5999{
6000 int ret = 0;
6001 str *to_tag, *from_tag;
6002 struct list_head *it;
6003 struct rtpproxy_copy_stream *rtp_stream;
6004
6005 if (leg == RTP_RELAY_CALLER) {
6006 from_tag = &args->from_tag;
6007 to_tag = &args->to_tag;
6008 } else {
6009 from_tag = &args->to_tag;
6010 to_tag = &args->from_tag;
6011 }
6012
6013 list_for_each(it, &ctx->streams[leg]) {
6014 rtp_stream = list_entry(it, struct rtpproxy_copy_stream, list);
6015 if (!(rtp_stream->flags & RTPPROXY_COPY_STREAM_STARTED) ||
6016 w_rtpproxy_stop_recording(NULL, &args->callid, from_tag,
6017 to_tag, args->node, NULL, rtp_stream->medianum + 1) > 0)
6018 ret++;
6019 }
6020 return ret;
6021}
6022
6023static int rtpproxy_api_copy_delete(struct rtp_relay_session *sess,
6024 struct rtp_relay_server *server, void *_ctx, str *flags)

Callers 1

rtpproxy_api_copy_deleteFunction · 0.85

Calls 2

list_entryClass · 0.50

Tested by

no test coverage detected