From 7d7a6bcb70c962e14ce1628f70e3203ae0c5e529 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 9 Sep 2025 15:29:41 -0600 Subject: [PATCH] Only enable transcribe and speech if their respective class exists (#7480) --- app/voicemail_greetings/voicemail_greeting_edit.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/voicemail_greetings/voicemail_greeting_edit.php b/app/voicemail_greetings/voicemail_greeting_edit.php index 4c3c054e2f..0e832d5be7 100644 --- a/app/voicemail_greetings/voicemail_greeting_edit.php +++ b/app/voicemail_greetings/voicemail_greeting_edit.php @@ -43,10 +43,16 @@ //add the settings object $settings = new settings(["domain_uuid" => $_SESSION['domain_uuid'], "user_uuid" => $_SESSION['user_uuid']]); - $speech_enabled = $settings->get('speech', 'enabled', false); + +//as long as the class exists, enable speech using default settings + $speech_enabled = class_exists('speech') && $settings->get('speech', 'enabled', false); $speech_engine = $settings->get('speech', 'engine', ''); - $transcribe_enabled = $settings->get('transcribe', 'enabled', false); + +//as long as the class exists, enable transcribe using default settings + $transcribe_enabled = class_exists('transcribe') && $settings->get('transcribe', 'enabled', false); $transcribe_engine = $settings->get('transcribe', 'engine', ''); + +//set the storage type from default settings $storage_type = $settings->get('voicemail', 'storage_type', ''); //set defaults