提交 87e0dda3 authored 作者: Anthony Minessale's avatar Anthony Minessale

no var set on outbound meands forbidden and on inbound it means optional

上级 fcef3ad4
...@@ -1105,7 +1105,15 @@ static void switch_core_session_parse_crypto_prefs(switch_core_session_t *sessio ...@@ -1105,7 +1105,15 @@ static void switch_core_session_parse_crypto_prefs(switch_core_session_t *sessio
suites = (char *) switch_channel_get_variable(session->channel, "rtp_secure_media_suites"); suites = (char *) switch_channel_get_variable(session->channel, "rtp_secure_media_suites");
} }
if (zstr(val) || !strcasecmp(val, "optional")) { if (zstr(val)) {
if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND) {
val = "optional";
} else {
val = "forbidden";
}
}
if (!strcasecmp(val, "optional")) {
smh->crypto_mode = CRYPTO_MODE_OPTIONAL; smh->crypto_mode = CRYPTO_MODE_OPTIONAL;
} else if (switch_true(val) || !strcasecmp(val, "mandatory")) { } else if (switch_true(val) || !strcasecmp(val, "mandatory")) {
smh->crypto_mode = CRYPTO_MODE_MANDATORY; smh->crypto_mode = CRYPTO_MODE_MANDATORY;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论