From 7da6ddda30ab9291ec810fa88d4219145616bae8 Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Mon, 10 Jul 2017 18:17:44 -0500 Subject: res_pjsip: Add "webrtc" configuration option This patch creates a new configuration option called "webrtc". When enabled it defaults and enables the following options that are needed in order for webrtc to work in Asterisk: rtcp-mux, use_avpf, ice_support, and use_received_transport=enabled media_encryption=dtls dtls_verify=fingerprint dtls_setup=actpass When "webrtc" is enabled, this patch also parses the "msid" media level attribute from an SDP. It will also appropriately add it onto the outgoing session when applicable. Lastly, when "webrtc" is enabled h264 RTCP FIR feedback frames are now sent. ASTERISK-27119 #close Change-Id: I5ec02e07c5d5b9ad86a34fdf31bf2f9da9aac6fd --- channels/chan_pjsip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'channels/chan_pjsip.c') diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index 931b60839..f009943ed 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -1595,7 +1595,9 @@ static int chan_pjsip_indicate(struct ast_channel *ast, int condition, const voi /* FIXME: Only use this for VP8. Additional work would have to be done to * fully support other video codecs */ - if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(ast), ast_format_vp8) != AST_FORMAT_CMP_NOT_EQUAL) { + if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(ast), ast_format_vp8) != AST_FORMAT_CMP_NOT_EQUAL || + (channel->session->endpoint->media.webrtc && + ast_format_cap_iscompatible_format(ast_channel_nativeformats(ast), ast_format_h264) != AST_FORMAT_CMP_NOT_EQUAL)) { /* FIXME Fake RTP write, this will be sent as an RTCP packet. Ideally the * RTP engine would provide a way to externally write/schedule RTCP * packets */ -- cgit v1.2.3