From b8f91d9563b3659851ca18e645bd3e1e403a6156 Mon Sep 17 00:00:00 2001 From: boffart <> Date: Wed, 28 Aug 2024 13:34:44 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D0=B2=D0=B5=D1=80=D1=82=D0=B0=D1=86=D0=B8=D1=8E=20=D1=81?= =?UTF-8?q?=D1=80=D0=B5=D0=B4=D1=81=D1=82=D0=B2=D0=B0=D0=BC=D0=B8=20asteri?= =?UTF-8?q?sk=20'alaw',=20'ulaw',=20'gsm',=20'g722',=20'wav'=20=D1=8D?= =?UTF-8?q?=D1=82=D0=BE=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B8=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D0=BE=20=D0=BC=D0=BE=D0=B3=D0=BB=D0=BE=20=D1=83?= =?UTF-8?q?=D1=85=D1=83=D0=B4=D1=88=D0=B0=D1=82=D1=8C=20=D0=BA=D0=B0=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B2=D0=BE=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PBXCoreREST/Lib/System/ConvertAudioFileAction.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/PBXCoreREST/Lib/System/ConvertAudioFileAction.php b/src/PBXCoreREST/Lib/System/ConvertAudioFileAction.php index e1e052ade..1606fc490 100644 --- a/src/PBXCoreREST/Lib/System/ConvertAudioFileAction.php +++ b/src/PBXCoreREST/Lib/System/ConvertAudioFileAction.php @@ -80,17 +80,6 @@ public static function main(string $filename): PBXApiResult Processes::mwExec("$lamePath -b 16 --silent '$n_filename' '$n_filename_mp3'", $out); $result_mp3 = implode('', $out); - // Convert the file to various codecs using Asterisk - $codecs = ['alaw', 'ulaw', 'gsm', 'g722', 'wav']; - $rmPath = Util::which('rm'); - $asteriskPath = Util::which('asterisk'); - foreach ($codecs as $codec){ - $result = shell_exec("$asteriskPath -rx 'file convert $tmp_filename $trimmedFileName.$codec'"); - if(strpos($result, 'Converted') !== 0){ - shell_exec("$rmPath -rf $trimmedFileName.$codec"); - } - } - // Remove temporary file unlink($tmp_filename); if ($result_str !== '' && $result_mp3 !== '') {