mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 08:51:50 +00:00
sigh
This commit is contained in:
parent
45b4ba1afa
commit
3201478830
@ -947,6 +947,8 @@ SWITCH_DECLARE(switch_status_t) switch_media_handle_create(switch_media_handle_t
|
|||||||
session->media_handle->engines[SWITCH_MEDIA_TYPE_VIDEO].ssrc =
|
session->media_handle->engines[SWITCH_MEDIA_TYPE_VIDEO].ssrc =
|
||||||
(uint32_t) ((intptr_t) &session->media_handle->engines[SWITCH_MEDIA_TYPE_VIDEO] + (uint32_t) time(NULL) / 2);
|
(uint32_t) ((intptr_t) &session->media_handle->engines[SWITCH_MEDIA_TYPE_VIDEO] + (uint32_t) time(NULL) / 2);
|
||||||
|
|
||||||
|
switch_channel_set_flag(session->channel, CF_DTLS_OK);
|
||||||
|
|
||||||
status = SWITCH_STATUS_SUCCESS;
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1817,21 +1819,11 @@ static void check_ice(switch_media_handle_t *smh, switch_media_type_t type, sdp_
|
|||||||
switch_rtp_engine_t *engine = &smh->engines[type];
|
switch_rtp_engine_t *engine = &smh->engines[type];
|
||||||
sdp_attribute_t *attr;
|
sdp_attribute_t *attr;
|
||||||
int i = 0, got_rtcp_mux = 0;
|
int i = 0, got_rtcp_mux = 0;
|
||||||
const char *tmp;
|
|
||||||
|
|
||||||
engine->ice_in.chosen[0] = 0;
|
engine->ice_in.chosen[0] = 0;
|
||||||
engine->ice_in.chosen[1] = 0;
|
engine->ice_in.chosen[1] = 0;
|
||||||
engine->ice_in.cand_idx = 0;
|
engine->ice_in.cand_idx = 0;
|
||||||
|
|
||||||
|
|
||||||
if (!(tmp = switch_channel_get_variable(smh->session->channel, "webrtc_enable_dtls")) || switch_true(tmp)) {
|
|
||||||
switch_channel_set_flag(smh->session->channel, CF_DTLS_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(tmp = switch_channel_get_variable(smh->session->channel, "enable_dtls")) || switch_true(tmp)) {
|
|
||||||
switch_channel_set_flag(smh->session->channel, CF_DTLS_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m) {
|
if (m) {
|
||||||
attr = m->m_attributes;
|
attr = m->m_attributes;
|
||||||
} else {
|
} else {
|
||||||
@ -2062,7 +2054,6 @@ static void check_ice(switch_media_handle_t *smh, switch_media_type_t type, sdp_
|
|||||||
SWITCH_DECLARE(void) switch_core_session_set_ice(switch_core_session_t *session)
|
SWITCH_DECLARE(void) switch_core_session_set_ice(switch_core_session_t *session)
|
||||||
{
|
{
|
||||||
switch_media_handle_t *smh;
|
switch_media_handle_t *smh;
|
||||||
const char *tmp;
|
|
||||||
|
|
||||||
switch_assert(session);
|
switch_assert(session);
|
||||||
|
|
||||||
@ -2070,10 +2061,6 @@ SWITCH_DECLARE(void) switch_core_session_set_ice(switch_core_session_t *session)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(tmp = switch_channel_get_variable(session->channel, "webrtc_enable_dtls")) || switch_true(tmp)) {
|
|
||||||
switch_channel_set_flag(session->channel, CF_DTLS_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch_channel_set_flag(session->channel, CF_VERBOSE_SDP);
|
switch_channel_set_flag(session->channel, CF_VERBOSE_SDP);
|
||||||
switch_channel_set_flag(session->channel, CF_WEBRTC);
|
switch_channel_set_flag(session->channel, CF_WEBRTC);
|
||||||
switch_channel_set_flag(session->channel, CF_ICE);
|
switch_channel_set_flag(session->channel, CF_ICE);
|
||||||
@ -2107,7 +2094,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
uint32_t near_rate = 0;
|
uint32_t near_rate = 0;
|
||||||
const switch_codec_implementation_t *mimp = NULL, *near_match = NULL;
|
const switch_codec_implementation_t *mimp = NULL, *near_match = NULL;
|
||||||
int codec_ms = 0;
|
int codec_ms = 0;
|
||||||
|
const char *tmp;
|
||||||
|
|
||||||
switch_assert(session);
|
switch_assert(session);
|
||||||
|
|
||||||
@ -2132,6 +2119,11 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dtls_ok(session) && (tmp = switch_channel_get_variable(smh->session->channel, "webrtc_enable_dtls")) && switch_false(tmp)) {
|
||||||
|
switch_channel_clear_flag(smh->session->channel, CF_DTLS_OK);
|
||||||
|
switch_channel_clear_flag(smh->session->channel, CF_DTLS);
|
||||||
|
}
|
||||||
|
|
||||||
if (proceed) *proceed = 1;
|
if (proceed) *proceed = 1;
|
||||||
|
|
||||||
greedy = !!switch_media_handle_test_media_flag(smh, SCMF_CODEC_GREEDY);
|
greedy = !!switch_media_handle_test_media_flag(smh, SCMF_CODEC_GREEDY);
|
||||||
@ -4807,18 +4799,12 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
|||||||
a_engine = &smh->engines[SWITCH_MEDIA_TYPE_AUDIO];
|
a_engine = &smh->engines[SWITCH_MEDIA_TYPE_AUDIO];
|
||||||
v_engine = &smh->engines[SWITCH_MEDIA_TYPE_VIDEO];
|
v_engine = &smh->engines[SWITCH_MEDIA_TYPE_VIDEO];
|
||||||
|
|
||||||
if (!(tmp = switch_channel_get_variable(smh->session->channel, "enable_dtls")) || switch_true(tmp)) {
|
if (dtls_ok(session) && (tmp = switch_channel_get_variable(smh->session->channel, "webrtc_enable_dtls")) && switch_false(tmp)) {
|
||||||
switch_channel_set_flag(session->channel, CF_DTLS_OK);
|
switch_channel_clear_flag(smh->session->channel, CF_DTLS_OK);
|
||||||
}
|
switch_channel_clear_flag(smh->session->channel, CF_DTLS);
|
||||||
|
|
||||||
if (switch_channel_test_flag(session->channel, CF_WEBRTC)) {
|
|
||||||
if (!(tmp = switch_channel_get_variable(session->channel, "webrtc_enable_dtls")) || switch_true(tmp)) {
|
|
||||||
switch_channel_set_flag(session->channel, CF_DTLS_OK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||||
|
|
||||||
if (!switch_channel_test_flag(session->channel, CF_WEBRTC) &&
|
if (!switch_channel_test_flag(session->channel, CF_WEBRTC) &&
|
||||||
switch_true(switch_channel_get_variable(session->channel, "media_webrtc"))) {
|
switch_true(switch_channel_get_variable(session->channel, "media_webrtc"))) {
|
||||||
switch_channel_set_flag(session->channel, CF_WEBRTC);
|
switch_channel_set_flag(session->channel, CF_WEBRTC);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user