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) {
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) &&
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:
}
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;