diff options
author | Kevin Harwell <kharwell@digium.com> | 2017-07-10 18:17:44 -0500 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2017-07-13 18:19:35 -0500 |
commit | 7da6ddda30ab9291ec810fa88d4219145616bae8 (patch) | |
tree | 89ad7fa5ae53b18a0a6412e85903ff7d8cd9d58b /res/res_pjsip.c | |
parent | 0f45c979a3de00b320e05ba93309cf412e9e2702 (diff) |
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
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r-- | res/res_pjsip.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index ee5c5fe5e..02112113c 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -1010,6 +1010,18 @@ underlying transport. Note that enabling bundle will also enable the rtcp_mux option. </para></description> </configOption> + <configOption name="webrtc" default="no"> + <synopsis>Defaults and enables some options that are relevant to WebRTC</synopsis> + <description><para> + When set to "yes" this also enables the following values that are needed in + order for basic WebRTC support to work: rtcp_mux, use_avpf, ice_support, and + use_received_transport. The following configuration settings also get defaulted + as follows:</para> + <para>media_encryption=dtls</para> + <para>dtls_verify=fingerprint</para> + <para>dtls_setup=actpass</para> + </description> + </configOption> </configObject> <configObject name="auth"> <synopsis>Authentication type</synopsis> @@ -4244,6 +4256,18 @@ void ast_copy_pj_str(char *dest, const pj_str_t *src, size_t size) dest[chars_to_copy] = '\0'; } +int ast_copy_pj_str2(char **dest, const pj_str_t *src) +{ + int res = ast_asprintf(dest, "%.*s", (int)pj_strlen(src), pj_strbuf(src)); + + if (res < 0) { + *dest = NULL; + } + + return res; +} + + int ast_sip_is_content_type(pjsip_media_type *content_type, char *type, char *subtype) { pjsip_media_type compare; |