| 5058 | } |
| 5059 | |
| 5060 | static int rtpproxy_api_stop_recording(str *callid, str *from_tag, |
| 5061 | str *to_tag, str *node, int medianum) |
| 5062 | { |
| 5063 | struct rtpp_node *rnode; |
| 5064 | int ret = -1; |
| 5065 | |
| 5066 | if (nh_lock) { |
| 5067 | lock_start_read( nh_lock ); |
| 5068 | } |
| 5069 | |
| 5070 | if (node) |
| 5071 | rnode = get_rtpp_node(node, NULL); |
| 5072 | else |
| 5073 | /* regular selection from the default rtpp set */ |
| 5074 | rnode = select_rtpp_node(NULL, *callid, *default_rtpp_set, NULL, 1); |
| 5075 | |
| 5076 | if (!rnode) { |
| 5077 | LM_ERR("no available proxies\n"); |
| 5078 | goto exit; |
| 5079 | } |
| 5080 | |
| 5081 | ret = w_rtpproxy_stop_recording(NULL, callid, from_tag, |
| 5082 | to_tag, rnode, NULL, medianum); |
| 5083 | |
| 5084 | exit: |
| 5085 | if (nh_lock) { |
| 5086 | lock_stop_read( nh_lock ); |
| 5087 | } |
| 5088 | return ret; |
| 5089 | } |
| 5090 | |
| 5091 | int load_rtpproxy(struct rtpproxy_binds *rtpb) |
| 5092 | { |
nothing calls this directly
no test coverage detected