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

Function rtpproxy_api_answer

modules/rtpproxy/rtpproxy.c:5310–5353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5308}
5309
5310static int rtpproxy_api_answer(struct rtp_relay_session *sess,
5311 struct rtp_relay_server *server, str *body,
5312 str *ip, str *type, str *in_iface, str *out_iface,
5313 str *global_flags, str *flags, str *extra_flags)
5314{
5315 int ret = -1;
5316 struct rtpp_set *rset = NULL;
5317 struct rtpp_args args;
5318
5319 memset(&args, '\0', sizeof(args));
5320
5321 if (!rtpproxy_fill_call_args(sess, &args, ip, type,
5322 in_iface, out_iface, global_flags, flags, extra_flags, 1))
5323 return -1;
5324
5325 if (nh_lock)
5326 lock_start_read(nh_lock);
5327
5328 rset = select_rtpp_set(server->set);
5329 if (!rset) {
5330 LM_ERR("RTPProxy set %d\n not available!\n", server->set);
5331 goto exit;
5332 }
5333
5334 args.set = rset;
5335 args.offer = 0;
5336
5337 if (server->node.s) {
5338 args.node = get_rtpp_node(&server->node, rset);
5339 if (!args.node) {
5340 LM_ERR("Could not use node %.*s for reply!\n",
5341 server->node.len, server->node.s);
5342 goto exit;
5343 }
5344 }
5345
5346 ret = rtpproxy_offer_answer(sess->msg, &args, NULL, NULL, body, NULL);
5347exit:
5348 if (nh_lock)
5349 lock_stop_read(nh_lock);
5350 rtpproxy_free_call_args(&args);
5351 return ret;
5352
5353}
5354
5355static int rtpproxy_api_delete(struct rtp_relay_session *sess, struct rtp_relay_server *server,
5356 str *flags, str *extra)

Callers

nothing calls this directly

Calls 5

rtpproxy_fill_call_argsFunction · 0.85
select_rtpp_setFunction · 0.85
get_rtpp_nodeFunction · 0.85
rtpproxy_offer_answerFunction · 0.85
rtpproxy_free_call_argsFunction · 0.85

Tested by

no test coverage detected