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

Function rtpproxy_api_copy_delete

modules/rtpproxy/rtpproxy.c:6023–6063  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6021}
6022
6023static int rtpproxy_api_copy_delete(struct rtp_relay_session *sess,
6024 struct rtp_relay_server *server, void *_ctx, str *flags)
6025
6026{
6027 int ret = -1;
6028 struct rtpp_args args;
6029 struct rtpp_set *rset = NULL;
6030
6031 memset(&args, '\0', sizeof(args));
6032
6033 if (!rtpproxy_fill_call_args(sess, &args, NULL, NULL,
6034 NULL, NULL, NULL, flags, NULL, 1))
6035 return -1;
6036
6037 if (!server->node.s) {
6038 LM_ERR("no RTPProxy node to use!\n");
6039 return -1;
6040 }
6041
6042 if (nh_lock)
6043 lock_start_read(nh_lock);
6044
6045 rset = select_rtpp_set(server->set);
6046 args.node = get_rtpp_node(&server->node, rset);
6047
6048 if (!args.node)
6049 args.node = select_rtpp_node(sess->msg,
6050 args.callid, rset, NULL, 0);
6051 if (!args.node) {
6052 LM_ERR("no available proxies\n");
6053 goto error;
6054 }
6055
6056 ret = rtpproxy_stop_recording_leg(_ctx, &args, flags, RTP_RELAY_CALLER) +
6057 rtpproxy_stop_recording_leg(_ctx, &args, flags, RTP_RELAY_CALLEE);
6058error:
6059 if (nh_lock)
6060 lock_stop_read(nh_lock);
6061 rtpproxy_free_call_args(&args);
6062 return ret <= 0?-1:1;
6063}
6064
6065static int rtpproxy_api_copy_serialize(void *_ctx, bin_packet_t *packet)
6066{

Callers

nothing calls this directly

Calls 6

rtpproxy_fill_call_argsFunction · 0.85
select_rtpp_setFunction · 0.85
get_rtpp_nodeFunction · 0.85
select_rtpp_nodeFunction · 0.85
rtpproxy_free_call_argsFunction · 0.85

Tested by

no test coverage detected