Added --GATEWAY option to the AST_CRON compress script
git-svn-id: svn://192.168.202.10@3803 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#
|
||||
# This program assumes that recordings are saved by Asterisk as .wav
|
||||
#
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2024 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
#
|
||||
# 80302-1958 - First Build
|
||||
@@ -39,10 +39,12 @@
|
||||
# 160523-0652 - Added --HTTPS option to use https instead of http in local location
|
||||
# 170212-0732 - Added --file-sorting option to put files into dated directories (THIS WILL NOT ALLOW FTP ARCHIVING)
|
||||
# 230201-0007 - Allowed for handling of stereo gateway recordings
|
||||
# 240213-1146 - Added --GATEWAY option
|
||||
#
|
||||
|
||||
$GSM=0; $MP3=0; $OGG=0; $GSW=0;
|
||||
$HTTPS=0;
|
||||
$GATEWAY=0;
|
||||
$maxfiles = 100000;
|
||||
$location='';
|
||||
|
||||
@@ -68,6 +70,7 @@ if (length($ARGV[0])>1)
|
||||
print " [--OGG] = compress into OGG Vorbis codec\n";
|
||||
print " [--GSW] = compress into GSM codec with RIFF headers and .wav extension\n";
|
||||
print " [--HTTPS] = use https instead of http in local location\n";
|
||||
print " [--GATEWAY] = use gateway recording server settings\n";
|
||||
print " [--run-check] = concurrency check, die if another instance is running\n";
|
||||
print " [--max-files=x] = maximum number of files to process, default is 100000\n";
|
||||
print " [--file-sorting] = sort files into subfolders in YYYY-MM-DD format (THIS WILL NOT ALLOW FTP ARCHIVING)\n";
|
||||
@@ -112,6 +115,11 @@ if (length($ARGV[0])>1)
|
||||
$HTTPS=1;
|
||||
if ($DB) {print "HTTPS location option enabled\n";}
|
||||
}
|
||||
if ($args =~ /--GATEWAY/i)
|
||||
{
|
||||
$GATEWAY=1;
|
||||
if ($DB) {print "GATEWAY settings option enabled\n";}
|
||||
}
|
||||
if ($args =~ /--GSM/i)
|
||||
{
|
||||
$GSM=1;
|
||||
@@ -375,7 +383,14 @@ foreach(@FILES)
|
||||
|
||||
if ($DB) {print "|$recording_id|$ALLfile|$dir2/$location$MP3file| |$SQLfile|\n";}
|
||||
|
||||
`$lamebin -b 16 -m m --silent "$dir2/$ALLfile" "$dir2/$location$MP3file"`;
|
||||
if ($GATEWAY > 0)
|
||||
{
|
||||
`$lamebin -b 16 -m s --silent "$dir2/$ALLfile" "$dir2/$location$MP3file"`;
|
||||
}
|
||||
else
|
||||
{
|
||||
`$lamebin -b 16 -m m --silent "$dir2/$ALLfile" "$dir2/$location$MP3file"`;
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE recording_log set location='$HTTP://$server_ip/RECORDINGS/$location$MP3file' where recording_id='$recording_id';";
|
||||
if($DBX){print STDERR "\n|$stmtA|\n";}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VICI RECORDING GATEWAY SERVER Started: 2023-01-14 Updated: 2023-02-01
|
||||
VICI RECORDING GATEWAY SERVER Started: 2023-01-14 Updated: 2024-02-13
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ Scripts to add to the crontab on the Gateway Recording server, staggered every 3
|
||||
/usr/share/astguiclient/AST_CRON_audio_1_gateway_stereo.pl --STEREO --debugX
|
||||
|
||||
(if required:)
|
||||
/usr/share/astguiclient/AST_CRON_audio_2_compress --MP3 --GATEWAY
|
||||
/usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --WAV --debugX --run-check --ftp-persistent --ftp-validate
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user