Fixing SRTP Feature on Default Settings Value Dial_String

1-It properly fixs SRTP feature on TLS enabled environment. It includes new dial_string value on /app/extension/app_config.php and then autogenerated /etc/fusionpbx/config.lua file would be created with properly dial_string values too on installation process (scripts.php).   
2-It also solves issue when Endpoint register with uppercase "TLS" protocol instead lowercase "tls". Regex is case sensitive,rtp_secure_media variable would never turn true with TLS Contact uppercase cases! 
3- It still accepts transport in lowercase "tls" transport ambient.
4- Now, every outbound INVITE to a TLS or tls endpoint Contact would receive crypto options inside SDP messages. Endpoints with compulsory SRTP feature enable should work ok now.
This commit is contained in:
Edson Lopes Filho 2023-08-31 11:51:55 -03:00 committed by GitHub
parent 879eb67a8a
commit f60aebd7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -244,7 +244,8 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "domain";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dial_string";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "{sip_invite_domain=\${domain_name},leg_timeout=\${call_timeout},presence_id=\${dialed_user}@\${dialed_domain}}\${sofia_contact(*/\${dialed_user}@\${dialed_domain})}";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "{sip_invite_domain=\${domain_name},leg_timeout=\${call_timeout},rtp_secure_media=\${regex(\${sofia_contact(\${dialed_user}@\${dialed_domain})}|transport=[Tt][Ll][Ss])},presence_id=\${dialed_user}@\${dialed_domain}}\${sofia_contact(*/\${dialed_user}@\${dialed_domain})}";
";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
@ -762,4 +763,4 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
?>