mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
no var set on outbound meands forbidden and on inbound it means optional
This commit is contained in:
parent
fcef3ad4b1
commit
87e0dda3d3
@ -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");
|
||||
}
|
||||
|
||||
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;
|
||||
} else if (switch_true(val) || !strcasecmp(val, "mandatory")) {
|
||||
smh->crypto_mode = CRYPTO_MODE_MANDATORY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user