| 5268 | } |
| 5269 | |
| 5270 | static int rtpengine_api_copy_offer(struct rtp_relay_session *sess, |
| 5271 | struct rtp_relay_server *server, void **_ctx, str *flags, |
| 5272 | unsigned int copy_flags, unsigned int streams, str *ret_body, |
| 5273 | struct rtp_relay_streams *ret_streams) |
| 5274 | { |
| 5275 | str tmp; |
| 5276 | bencode_item_t *ret; |
| 5277 | ret = rtpengine_api_copy_op(sess, OP_SUBSCRIBE_REQUEST, |
| 5278 | server, *_ctx, flags, copy_flags, NULL); |
| 5279 | if (!ret) |
| 5280 | return -1; |
| 5281 | if (!bencode_dictionary_get_str_dup(ret, "sdp", ret_body)) |
| 5282 | LM_ERR("failed to extract sdp body from proxy reply\n"); |
| 5283 | if (ret_streams) |
| 5284 | rtpengine_copy_streams(bencode_dictionary_get(ret, "tag-medias"), ret_streams); |
| 5285 | if (!bencode_dictionary_get_str(ret, "to-tag", &tmp)) |
| 5286 | LM_ERR("failed to extract to-tag from proxy reply\n"); |
| 5287 | else |
| 5288 | *_ctx = rtpengine_new_subs(&tmp); |
| 5289 | bencode_buffer_free(bencode_item_buffer(ret)); |
| 5290 | return 0; |
| 5291 | } |
| 5292 | |
| 5293 | static int rtpengine_api_copy_answer(struct rtp_relay_session *sess, |
| 5294 | struct rtp_relay_server *server, void *subs, str *flags, str *body) |
nothing calls this directly
no test coverage detected