diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 500521eddb..88689708b9 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -559,6 +559,7 @@ $array["voicemails"][$i]["voicemail_enabled"] = $voicemail_enabled; $array["voicemails"][$i]["voicemail_description"] = $description; $array["voicemails"][$i]["voicemail_tutorial"] = $voicemail_tutorial; + $array["voicemails"][$i]["voicemail_transcription_enabled"] = $_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?: false; } } diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index c357ce090a..10359a1f86 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -296,6 +296,15 @@ $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Voicemail enabled default value."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f74cd0b-7f2e-4504-ac02-8755e0364a1e"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "voicemail"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "transcription_enabled_default"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Transcription enabled default value."; + //schema details $y=0; diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 8da0561eb7..aa6e20fa1b 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -137,6 +137,8 @@ //get a new voicemail_uuid if ($action == "add" && permission_exists('voicemail_add')) { $voicemail_uuid = uuid(); + //If adding a mailbox, set the default transcribe behavior + $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; } //add common array fields @@ -305,7 +307,7 @@ //set defaults if (strlen($voicemail_local_after_email) == 0) { $voicemail_local_after_email = "true"; } if (strlen($voicemail_enabled) == 0) { $voicemail_enabled = "true"; } - if (strlen($voicemail_transcription_enabled) == 0) { $voicemail_transcription_enabled = "false"; } + if (strlen($voicemail_transcription_enabled) == 0) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?: "false"; } if (strlen($voicemail_tutorial) == 0) { $voicemail_tutorial = "false"; } //get the greetings list