summaryrefslogtreecommitdiff
path: root/res/res_pjsip.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2017-03-07 14:13:02 -0600
committerMark Michelson <mmichelson@digium.com>2017-03-15 10:39:05 -0500
commit7bc69753bc79fa47508c5d62e9bc27f41698bb41 (patch)
tree932a4bf50f0215f3a7d3d349eab20f36f38db9c2 /res/res_pjsip.c
parent947f1ebf861254c2544d6f1956ca7f31d1d393f7 (diff)
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
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r--res/res_pjsip.c10
1 files changed, 10 insertions, 0 deletions
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.
</para></description>
</configOption>
+ <configOption name="rtcp_mux" default="no">
+ <synopsis>Enable RFC 5761 RTCP multiplexing on the RTP port</synopsis>
+ <description><para>
+ 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.
+ </para></description>
+ </configOption>
</configObject>
<configObject name="auth">
<synopsis>Authentication type</synopsis>