summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2017-07-17 14:54:22 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-07-17 14:54:22 -0500
commit29af7d5558d325e262fc033fd1399e79bcefb0e0 (patch)
tree59296bd34141fc8d0a66d206f894a350ffce8a43 /res
parent785beacda7581e6a8a7c84801f0262617d9d3bce (diff)
parent942ee54b53a68d4eec4463f8be8735d2f8edb580 (diff)
Merge "res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use."
Diffstat (limited to 'res')
-rw-r--r--res/res_rtp_asterisk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 9d3969fbe..a2e63ec0b 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2650,9 +2650,15 @@ static int __rtp_sendto(struct ast_rtp_instance *instance, void *buf, size_t siz
#ifdef HAVE_PJPROJECT
if (transport_rtp->ice) {
+ enum ast_rtp_ice_component_type component = rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP;
pj_status_t status;
struct ice_wrap *ice;
+ /* If RTCP is sharing the same socket then use the same component */
+ if (rtcp && rtp->rtcp->s == rtp->s) {
+ component = AST_RTP_ICE_COMPONENT_RTP;
+ }
+
pj_thread_register_check();
/* Release the instance lock to avoid deadlock with PJPROJECT group lock */
@@ -2661,8 +2667,7 @@ static int __rtp_sendto(struct ast_rtp_instance *instance, void *buf, size_t siz
if (instance == transport) {
ao2_unlock(instance);
}
- status = pj_ice_sess_send_data(ice->real_ice,
- rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP, temp, len);
+ status = pj_ice_sess_send_data(ice->real_ice, component, temp, len);
ao2_ref(ice, -1);
if (instance == transport) {
ao2_lock(instance);