mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 10:43:49 +00:00
Voicemail Messages - Restore non-Base64 message audio waveform generation.
This commit is contained in:
@@ -110,11 +110,29 @@
|
||||
|
||||
//prepare full file path
|
||||
if (file_exists($path.'/waveform_'.$_GET['id'].'_'.$rand.'.wav')) {
|
||||
$file_ext = 'wav';
|
||||
$full_file_path = $path.'/waveform_'.$_GET['id'].'_'.$rand.'.wav';
|
||||
}
|
||||
else if (file_exists($path.'/waveform_'.$_GET['id'].'_'.$rand.'.mp3')) {
|
||||
$file_ext = 'mp3';
|
||||
$full_file_path = $path.'/waveform_'.$_GET['id'].'_'.$rand.'.mp3';
|
||||
}
|
||||
else {
|
||||
if (file_exists($path.'/msg_'.$_GET['id'].'.wav')) {
|
||||
copy($path.'/msg_'.$_GET['id'].'.wav', $path.'/waveform_'.$_GET['id'].'_'.$rand.'.wav');
|
||||
if (file_exists($path.'/waveform_'.$_GET['id'].'_'.$rand.'.wav')) {
|
||||
$file_ext = 'wav';
|
||||
$full_file_path = $path.'/waveform_'.$_GET['id'].'_'.$rand.'.wav';
|
||||
}
|
||||
}
|
||||
else if (file_exists($path.'/msg_'.$_GET['id'].'.mp3')) {
|
||||
copy($path.'/msg_'.$_GET['id'].'.mp3', $path.'/waveform_'.$_GET['id'].'_'.$rand.'.mp3');
|
||||
if (file_exists($path.'/waveform_'.$_GET['id'].'_'.$rand.'.mp3')) {
|
||||
$file_ext = 'mp3';
|
||||
$full_file_path = $path.'/waveform_'.$_GET['id'].'_'.$rand.'.mp3';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -239,7 +257,7 @@
|
||||
switch ($_GET['type']) {
|
||||
|
||||
case 'message':
|
||||
if (!empty($_SESSION['voicemail']['storage_type']['text']) && $_SESSION['voicemail']['storage_type']['text'] == 'base64') {
|
||||
if (file_exists($path.'/waveform_'.$_GET['id'].'_'.$rand.'.'.$file_ext)) {
|
||||
@unlink($path.'/waveform_'.$_GET['id'].'_'.$rand.'.'.$file_ext);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user