Skip to content

Commit

Permalink
Fix media encryption configuration for tancredi
Browse files Browse the repository at this point in the history
  • Loading branch information
Stell0 committed Feb 14, 2020
1 parent fe9523e commit 417720d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,12 @@ function nethcti3_get_config_early($engine) {
}
}
// srtp
if (array_key_exists('media_encryption', $sip) && $sip['media_encryption'] == 'yes') {
$user_variables['account_srtp_encryption_1'] = 'optional';
if (array_key_exists('media_encryption', $sip) && ( $sip['media_encryption'] == 'sdes' || $sip['media_encryption'] == 'dtls')) {
if (array_key_exists('media_encryption_optimistic', $sip) && $sip['media_encryption_optimistic'] == 'no') {
$user_variables['account_srtp_encryption_1'] = 'compulsory';
} else {
$user_variables['account_srtp_encryption_1'] = 'optional';
}
} else {
$user_variables['account_srtp_encryption_1'] = 'disabled';
}
Expand Down

0 comments on commit 417720d

Please sign in to comment.