wip
This commit is contained in:
parent
daea865e7b
commit
aa3368a1ac
|
@ -635,7 +635,7 @@ static switch_status_t switch_core_media_build_crypto(switch_media_handle_t *smh
|
|||
type_str = SWITCH_RTP_CRYPTO_KEY_32;
|
||||
}
|
||||
|
||||
#define SAME_KEY
|
||||
//#define SAME_KEY
|
||||
#ifdef SAME_KEY
|
||||
if (switch_channel_test_flag(channel, CF_WEBRTC) && type == SWITCH_MEDIA_TYPE_VIDEO) {
|
||||
if (direction == SWITCH_RTP_CRYPTO_SEND) {
|
||||
|
@ -2258,7 +2258,8 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||
ptime = atoi(attr->a_value);
|
||||
} else if (!strcasecmp(attr->a_name, "maxptime") && attr->a_value) {
|
||||
maxptime = atoi(attr->a_value);
|
||||
} else if (!got_crypto && !strcasecmp(attr->a_name, "crypto") && !zstr(attr->a_value)) {
|
||||
} else if (!got_crypto && !strcasecmp(attr->a_name, "crypto") && !zstr(attr->a_value) &&
|
||||
(!switch_channel_test_flag(session->channel, CF_WEBRTC) || switch_stristr(SWITCH_RTP_CRYPTO_KEY_80, attr->a_value))) {
|
||||
int crypto_tag;
|
||||
|
||||
if (!(smh->mparams->ndlb & SM_NDLB_ALLOW_CRYPTO_IN_AVP) &&
|
||||
|
|
|
@ -1888,9 +1888,11 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
|
|||
policy->key = (uint8_t *) crypto_key->key;
|
||||
policy->next = NULL;
|
||||
|
||||
policy->window_size = 1024;
|
||||
policy->allow_repeat_tx = 1;
|
||||
|
||||
policy->rtp.sec_serv = sec_serv_conf_and_auth;
|
||||
policy->rtcp.sec_serv = sec_serv_conf_and_auth;
|
||||
//policy->rtp.sec_serv = sec_serv_conf_and_auth;
|
||||
//policy->rtcp.sec_serv = sec_serv_conf_and_auth;
|
||||
|
||||
switch (direction) {
|
||||
case SWITCH_RTP_CRYPTO_RECV:
|
||||
|
@ -1914,8 +1916,9 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
|
|||
}
|
||||
break;
|
||||
case SWITCH_RTP_CRYPTO_SEND:
|
||||
policy->ssrc.type = ssrc_specific;
|
||||
policy->ssrc.value = rtp_session->ssrc;
|
||||
policy->ssrc.type = ssrc_any_outbound;
|
||||
//policy->ssrc.type = ssrc_specific;
|
||||
//policy->ssrc.value = rtp_session->ssrc;
|
||||
|
||||
if (rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND]) {
|
||||
rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND_RESET] = 1;
|
||||
|
|
Loading…
Reference in New Issue