From 7bc69753bc79fa47508c5d62e9bc27f41698bb41 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 7 Mar 2017 14:13:02 -0600 Subject: Add rtcp-mux support This commit adds support for RFC 5761: Multiplexing RTP Data and Control Packets on a Single Port. Specifically, it enables the feature when using chan_pjsip. A new option, "rtcp_mux" has been added to endpoint configuration in pjsip.conf. If set, then Asterisk will attempt to use rtcp-mux with whatever it communicates with. Asterisk follows the rules set forth in RFC 5761 with regards to falling back to standard RTCP behavior if the far end does not indicate support for rtcp-mux. The lion's share of the changes in this commit are in res_rtp_asterisk.c. This is because it was pretty much hard wired to have an RTP and an RTCP transport. The strategy used here is that when rtcp-mux is enabled, the current RTCP transport and its trappings (such as DTLS SSL session) are freed, and the RTCP session instead just mooches off the RTP session. This leads to a lot of specialized if statements throughout. ASTERISK-26732 #close Reported by Dan Jenkins Change-Id: If46a93ba1282418d2803e3fd7869374da8b77ab5 --- res/res_pjsip.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'res/res_pjsip.c') diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 347658f9c..8d2b8f763 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -944,6 +944,16 @@ to the receiving one. + + Enable RFC 5761 RTCP multiplexing on the RTP port + + With this option enabled, Asterisk will attempt to negotiate the use of the "rtcp-mux" + attribute on all media streams. This will result in RTP and RTCP being sent and received + on the same port. This shifts the demultiplexing logic to the application rather than + the transport layer. This option is useful when interoperating with WebRTC endpoints + since they mandate this option's use. + + Authentication type -- cgit v1.2.3