Page 1 of 1

RECORDING WITH 0KB

PostPosted: Tue Mar 23, 2021 2:50 pm
by dgxa
Hello I have a problem with the audio conversion scripts. Right now my dialplan is configured for save the recording in .gsm and the Campaign Rec exten is 8310.

The order in crontab of my script recording is the following:
### recording mixing/compressing/ftping scripts
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl
#0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl --MIX
#0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl
1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --GSM
2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --GSM

My dialplan is it:

exten => _509XXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _509XXXXXXXX,n,Set(MES=${STRFTIME(${EPOCH},,%Y%m)})
exten => _509XXXXXXXX,n,Set(DIA=${STRFTIME(${EPOCH},,%d)})
exten => _509XXXXXXXX,n,System(sh /usr/local/sbin/checkDayDir.sh ${MES} ${DIA})
exten => _509XXXXXXXX,n,MixMonitor(/var/spool/asterisk/monitor/${MES}/${DIA}/OUT-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${EXTEN:2}-${CALLERID(num)}.gsm)
exten => _509XXXXXXXX,n,Dial(${SIPTRUNKP2}/${EXTEN:2},,tTo)
exten => _509XXXXXXXX,n,Hangup

I dont´t know what happen but when i made audio validation in /var/spool/monitorDONE the weight is of the final file is 0 KB

CentOS Linux release 7.8.2003 (Core) || Asterisk 13.21.0-vici || mysql Ver 15.1 Distrib 5.5.65-MariaDB, for Linux (x86_64) using readline 5.1 || VERSION: 2.14-772a
CONSTRUCCION: 201004-1045 2020 ViciDial Group

Re: RECORDING WITH 0KB

PostPosted: Sat Mar 27, 2021 6:24 am
by mjohn425
The 8310 and 8309 require nothing on the dialplan end in regards to the recording so I would remove the MixMonitor line, also unsure of the function of your System call? Regarding the crontab, 8310 already records in GSM so I suspect that your compress cron will not be needed.

Re: RECORDING WITH 0KB

PostPosted: Mon Mar 29, 2021 10:21 am
by dgxa
When I use AST_CRON_audio_1_move_mix.pl all audio store in /var/spool/asterisk/monitorDONE/ORIG and the script AST_CRON_audio_2_compress.pl doesn´t have option to copy from de ORIG folder and I use the --GSM option to execute the movement between the folders ORIG --> GSM --> FTP

Please let me know if i am wrong. The other idea is add the --run-check to AST_CRON_audio_2_compress.pl

[root@mfvicipilot10pri astguiclient]# perl AST_CRON_audio_3_ftp.pl --help
allowed run time options:
[--help] = this screen
[--debug] = debug
[--debugX] = super debug
[--test] = test
[--transfer-limit=XXX] = number of files to transfer before exiting
[--list-limit=XXX] = number of files to list in the directory before moving on
[--debugX] = super debug
[--GSM] = copy GSM files
[--MP3] = copy MPEG-Layer-3 files
[--OGG] = copy OGG Vorbis files
[--WAV] = copy WAV files
[--GSW] = copy GSM with RIFF headers and .wav extension files
[--GPG] = copy GPG encrypted files
[--nodatedir] = do not put into dated directories
[--YMDdatedir] = put into Year/Month/Day dated directories
[--YearYMDdatedir] = put into Year/YYYYMMDD dated directories
[--localdatedir] = create dated directories inside of FTP directory on local server
[--run-check] = concurrency check, die if another instance is running
[--max-files=x] = maximum number of files to process, defaults to 100000
[--ftp-server=XXX] = FTP server
[--ftp-port=XXX] = FTP server port
[--ftp-login=XXX] = FTP server login account
[--ftp-pass=XXX] = FTP server password
[--ftp-dir=XXX] = FTP server directory
[--ftp-persistent] = Does not log out between every file transmission
[--ftp-validate] = Checks for a file size on the file after transmission


[root@mfvicipilot10pri astguiclient]# ls -la /var/spool/asterisk/monitorDONE/
drwxr-xr-x 3 root root 704512 mar 27 12:17 FTP
drwxr-xr-x 2 root root 4096 oct 21 13:47 FTP2
drwxr-xr-x 2 root root 4096 oct 21 13:47 GPG
drwxr-xr-x 2 root root 12288 mar 29 10:07 GSM
drwxr-xr-x 2 root root 4096 oct 21 13:47 GSW
drwx------ 2 root root 16384 feb 23 22:01 lost+found
drwxr-xr-x 2 root root 4096 oct 21 13:47 MP3
drwxr-xr-x 2 root root 4096 oct 21 13:47 OGG
drwxr-xr-x 4 root root 843776 mar 29 10:09 ORIG