Page 1 of 1

CHANGE PATH RECORDING

PostPosted: Mon Nov 30, 2020 2:54 pm
by dgxa
Hi I want to change the path recording of vicidial (asterisk) , i am seeing that the audio storage is /var/spool/asterisk/monitor and after run the vicidial script move to /var/spool/asterisk/monitorDONE

I want to change those route for customization reasons. In my scenario the path /var/spool/asterisk/monitor will be /mnt/grabaciones/spool/asterisk/monitor and /var/spool/asterisk/monitorDONE will be /mnt/grabaciones/spool/asterisk/monitorDONE. Those PATH will be take the same folders that the default route previously indicated

I want to make of this way the things for achieve my objective:

1.- Mount my partition /mnt/grabaciones
2.- Copy the PATHS /var/spool/asterisk/monitor and /var/spool/asterisk/monitorDONE to the place previously indicated
3.- Change the PATH use by astGUIclient (/etc/astguiclient.conf)
OLD VALUES
PATHmonitor => /var/spool/asterisk/monitor
PATHDONEmonitor => /var/spool/asterisk/monitorDONE
NEW VALUES
PATHmonitor => /mnt/grabaciones/spool/asterisk/monitor
PATHDONEmonitor => /mnt/grabaciones/spool/asterisk/monitorDONE
4.- Change PATH in /etc/asterisk/asterisk.conf
OLD VALUES
astspooldir => /var/spool/asterisk
NEW VALUES
astspooldir => /mnt/grabaciones/spool/asterisk
5.- Reload asterisk and test made changes

Could you help me to see if any step is incomplete, i understand that /etc/astguiclient.conf save the variables of the perl scripts for vicidial. In this case have i to run other script to reload some configuration or not.


VICIDIAL VERSION: 2.14-770a
SO CENTOS 7
ASTERISK version 13

Re: CHANGE PATH RECORDING

PostPosted: Wed Dec 02, 2020 7:58 am
by carpenox
your trying to reinvent the wheel. just run this command: /usr/src/astguiclient/trunk/install.pl

-nox

Re: CHANGE PATH RECORDING

PostPosted: Thu Dec 03, 2020 7:01 pm
by dgxa
Thank for your suggestion. I will change the PATHS in the script $PATHmonitor and $PATHDONEmonitor in /usr/src/astguiclient/trunk/install.pl

Question, can i to run this script in any moment to change the route or only can run it at the installation time?

Re: CHANGE PATH RECORDING

PostPosted: Thu Dec 03, 2020 7:12 pm
by carpenox
you can change it at any time using that script

Re: CHANGE PATH RECORDING

PostPosted: Fri Dec 04, 2020 12:44 pm
by williamconley
monitor is often a memory drive to improve system performance. so be cautious when moving it. i usually use a sym link to put the other folders where vicidial already expects to find them. this way the environment vicidial finds itself upon restore is always the same after a fresh install/restore occurs. nobody has to remember to create a new non-standard folder structure unless the new system requires it.

i also don't recommend changing that folder in the first place. use the FTP audio archiving script to put files in another location if you need them moved. there's even an option for a redundant storage location for disaster recovery (or simple HD failure).

Re: CHANGE PATH RECORDING

PostPosted: Sun Dec 06, 2020 1:34 pm
by boybawang
You should only change the path /var/spool/asterisk/monitorDONE to the desired path of your liking because thats where the call recordings will be stored, this directory : /var/spool/asterisk/monitor is used to process the IN and OUT wav files or RAW audio recordings and by default this is done in a RAM drive which is linked to the /var/spool/asterisk/monitor directory (see /etc/fstab) so it would be wise to only change the path /var/spool/asterisk/monitorDONE

Re: CHANGE PATH RECORDING

PostPosted: Tue Dec 08, 2020 10:30 pm
by dgxa
carpenox wrote:you can change it at any time using that script


I made a test installation and I had this result:

defined conf file: /etc/astguiclient.conf
defined home path: /usr/share/astguiclient
defined logs path: /var/log/astguiclient
defined agi-bin path: /var/lib/asterisk/agi-bin
defined webroot path: /var/www/html
defined sounds path: /var/lib/asterisk/sounds
defined monitor path: /mnt/grabaciones/asterisk/monitor
defined DONEmonitor path: /mnt/grabaciones/asterisk/monitorDONE
defined server_ip: 192.168.192.133
defined DB_server: localhost
defined DB_database: asterisk
defined DB_user: cron
defined DB_pass: 1234
defined DB_custom_user: custom
defined DB_custom_pass: custom1234
defined DB_port: 3306
defined active_keepalives: 1234568
defined asterisk_version: 13.X
defined copying conf files: y
defined copying weblang files:
defined FTP_host: 10.0.0.4
defined FTP_user: cron
defined FTP_pass: test
defined FTP_port: 21
defined FTP_dir: RECORDINGS
defined HTTP_path: http://10.0.0.4
defined REPORT_host: 10.0.0.4
defined REPORT_user: cron
defined REPORT_pass: test
defined REPORT_port: 21
defined REPORT_dir: REPORTS
defined fastagi_log_min_servers: 3
defined fastagi_log_max_servers: 16
defined fastagi_log_min_spare_servers: 2
defined fastagi_log_max_spare_servers: 8
defined fastagi_log_max_requests: 1000
defined fastagi_log_checkfordead: 30
defined fastagi_log_checkforwait: 60

ls -Rl /mnt/grabaciones/
/mnt/grabaciones/:
total 20
drwxr-xr-x 4 root root 4096 Dec 8 21:40 asterisk
drwx------ 2 root root 16384 Dec 8 19:23 lost+found

/mnt/grabaciones/asterisk:
total 8
drwxr-xr-x 3 root root 4096 Dec 8 21:41 monitor
drwxr-xr-x 10 root root 4096 Dec 8 21:41 monitorDONE

/mnt/grabaciones/asterisk/monitor:
total 4
drwxr-xr-x 2 root root 4096 Dec 8 21:41 MIX

/mnt/grabaciones/asterisk/monitor/MIX:
total 0

/mnt/grabaciones/asterisk/monitorDONE:
total 32
drwxr-xr-x 2 root root 4096 Dec 8 21:41 FTP
drwxr-xr-x 2 root root 4096 Dec 8 21:41 FTP2
drwxr-xr-x 2 root root 4096 Dec 8 21:41 GPG
drwxr-xr-x 2 root root 4096 Dec 8 21:41 GSM
drwxr-xr-x 2 root root 4096 Dec 8 21:41 GSW
drwxr-xr-x 2 root root 4096 Dec 8 21:41 MP3
drwxr-xr-x 2 root root 4096 Dec 8 21:41 OGG
drwxr-xr-x 2 root root 4096 Dec 8 21:41 ORIGcat /etc/astguiclient.conf
# astguiclient.conf - configuration elements for the astguiclient package
# this is the astguiclient configuration file
# all comments will be lost if you run install.pl again

# Paths used by astGUIclient
PATHhome => /usr/share/astguiclient
PATHlogs => /var/log/astguiclient
PATHagi => /var/lib/asterisk/agi-bincat /etc/asterisk/asterisk.conf
[directories](!)
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin


PATHweb => /var/www/html
PATHsounds => /var/lib/asterisk/sounds
PATHmonitor => /mnt/grabaciones/asterisk/monitor
PATHDONEmonitor => /mnt/grabaciones/asterisk/monitorDONE

The doubt that i have is if have i to change astspooldir => /var/spool/asterisk of the manual way because that you see it has the default route assigned for spooldir

This installation was made with CentOS 7

Re: CHANGE PATH RECORDING

PostPosted: Tue Jun 18, 2024 1:01 pm
by corretico
I had the same problem and I solved it with a bash script that runs and does two processes: move the audio to a new path (/mnt/Recordings) and modify the location field in the recording_log table. We do some extra process like classify the audios by account (campaign/inbound) and date. The script is executed once the vicidial finishes the process of generating the audio (process IN and OUT file).

If you are interested in the script, write me and I'll share with you.