costmetic change so outbound srtp doesn't show up as (null)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13737 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-06-09 23:17:50 +00:00
parent 1d05845368
commit a7a726a887
1 changed files with 10 additions and 1 deletions

View File

@ -948,16 +948,25 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
rtp_session->crypto_keys[direction] = crypto_key; rtp_session->crypto_keys[direction] = crypto_key;
memset(policy, 0, sizeof(*policy)); memset(policy, 0, sizeof(*policy));
switch (crypto_key->type) { switch (crypto_key->type) {
case AES_CM_128_HMAC_SHA1_80: case AES_CM_128_HMAC_SHA1_80:
crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy->rtp); crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy->rtp);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_128_HMAC_SHA1_80");
}
break; break;
case AES_CM_128_HMAC_SHA1_32: case AES_CM_128_HMAC_SHA1_32:
crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy->rtp); crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy->rtp);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_128_HMAC_SHA1_32");
}
break; break;
case AES_CM_128_NULL_AUTH: case AES_CM_128_NULL_AUTH:
crypto_policy_set_aes_cm_128_null_auth(&policy->rtp); crypto_policy_set_aes_cm_128_null_auth(&policy->rtp);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_variable(channel, "sip_has_crypto", "AES_CM_128_NULL_AUTH");
}
break; break;
default: default:
break; break;