mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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
This commit is contained in:
@@ -395,6 +395,7 @@ static void session_media_dtor(void *obj)
|
||||
}
|
||||
|
||||
ast_free(session_media->mid);
|
||||
ast_free(session_media->msid);
|
||||
}
|
||||
|
||||
struct ast_sip_session_media *ast_sip_session_media_state_add(struct ast_sip_session *session,
|
||||
@@ -3573,15 +3574,17 @@ static int add_bundle_groups(struct ast_sip_session *session, pj_pool_t *pool, p
|
||||
int index, mid_id;
|
||||
struct sip_session_media_bundle_group *bundle_group;
|
||||
|
||||
if (session->endpoint->media.webrtc) {
|
||||
attr = pjmedia_sdp_attr_create(pool, "msid-semantic", pj_cstr(&stmp, "WMS *"));
|
||||
pjmedia_sdp_attr_add(&answer->attr_count, answer->attr, attr);
|
||||
}
|
||||
|
||||
if (!session->endpoint->media.bundle) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
memset(bundle_groups, 0, sizeof(bundle_groups));
|
||||
|
||||
attr = pjmedia_sdp_attr_create(pool, "msid-semantic", pj_cstr(&stmp, "WMS *"));
|
||||
pjmedia_sdp_attr_add(&answer->attr_count, answer->attr, attr);
|
||||
|
||||
/* Build the bundle group layout so we can then add it to the SDP */
|
||||
for (index = 0; index < AST_VECTOR_SIZE(&session->pending_media_state->sessions); ++index) {
|
||||
struct ast_sip_session_media *session_media = AST_VECTOR_GET(&session->pending_media_state->sessions, index);
|
||||
|
Reference in New Issue
Block a user