Call recording to NAS mounted on single server

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

Call recording to NAS mounted on single server

Postby glenewhittenberg » Mon Jan 06, 2014 11:45 pm

hello all. New to vici and first time post. Been reading this site for the last few weeks. Major help i must say. Built my first vicibox last week. Working awesome. Had to use support for an audio store issue and I was unable to transfer a call to play an audio. Thanks for the assist Matt! I think both issues are from me restoring the old 3.x database.

I have a Drobo 5n NAS I have mounted to my server and using it for backups. Decent wire speed at 50MBs. Gigabit NIC's in dialer and Drobo with a Gigabit HP Layer 2 Switch between them. I currently have all recordings off but there is talk of having this on. The Server is hella fast with 4x 120GB SSD cards in RAID10 Array. This only gives me 217GB usable space on the / file system though. The Drobo has 3x 1TB drives in proprietary RAID that gives me 2TB usable space.

If i turn on recording can i off load this to the NAS? How do i automate this process?

I think the following is correct

Open SuSE 12.3 (x86_64)
ViciBox Redux v.5.0.2-130821
Asterisk 1.8.25.0-vici built by abuild @ build06 on a x86_64
astGUIClient = 2.8b0.5
SVN = 2052
Mysql 5.5.33-MariaDB-log openSUSE package
Telco's provided by SIP through Internet. No digi cards and the like on this one

Thanks for the replies
Single Server:
SuSE 12.3 (x86_64) : ViciBox v.5.0.2-130821 : Asterisk 1.8.26.1-vici : astGUI 2.8b0.5 : SVN = 2088
Mysql 5.5.33-MariaDB-log : Xeon E5-2620, 4x 8GB ECC 1600 RAM, 4x 2TB WD RE4 SATA3 RAID10
glenewhittenberg
 
Posts: 54
Joined: Fri Jan 03, 2014 1:15 am

Re: Call recording to NAS mounted on single server

Postby glenewhittenberg » Wed Jan 08, 2014 12:55 am

no one wants to take a stab at this? any input would be welcome. Thanks!
Single Server:
SuSE 12.3 (x86_64) : ViciBox v.5.0.2-130821 : Asterisk 1.8.26.1-vici : astGUI 2.8b0.5 : SVN = 2088
Mysql 5.5.33-MariaDB-log : Xeon E5-2620, 4x 8GB ECC 1600 RAM, 4x 2TB WD RE4 SATA3 RAID10
glenewhittenberg
 
Posts: 54
Joined: Fri Jan 03, 2014 1:15 am

Re: Call recording to NAS mounted on single server

Postby geoff3dmg » Wed Jan 08, 2014 5:39 am

Does the NAS have FTP and HTTP access? If so you can just configure it as your archive server.
Vicibox 5.03 from .iso | VERSION: 2.10-451a BUILD: 140902-0816 | Asterisk 1.8.28.2-vici | Multi-Server | Amfeltec H/W Timing Cards | No Extra Software After Installation | Dell PowerEdge 1850 | Pentium 4 'Prescott' Xenon Quad @ 3.40GHz
geoff3dmg
 
Posts: 403
Joined: Tue Jan 29, 2013 4:35 am
Location: Lancashire, UK

Re: Call recording to NAS mounted on single server

Postby DomeDan » Wed Jan 08, 2014 6:19 am

Hello and welcome to the forum!

The first and the most recommended way is to use the ftp method made by the vicidial team:
AST_CRON_audio_3_ftp.pl

Then you need to enable ftp on your NAS...
I just looked up that Drobo 5n and it seams to only support CIFS, SMB, AFP.. ok then that option is out of question.

The next method is to mount a CIFS/SMB share directly on /var/spool/asterisk/monitorDONE/GSW/
this requires that the NAS is always up and always is reachable else the AST_CRON_audio_2_compress.pl script will fail and I'm not sure if its simply just to re-run the script when the GSW directory is reachable again.
I would stay away from this method, but its a easy setup.

An other method is to mount the NAS somewhere on the server and write a simple script to move the files to the NAS mount-point
but the script will get a bit more complex when you want to update the new location in the database to be able to play the file from the vicidial admin web-interface.

I did this because I didn't know of the built in ftp method, I wrote a php-script to move the files and update the database (150 lines of code)
and I made a apache alias to point to the moved files
I made the script only move SALE recordings and update the location to for example http://vicibox/SALE_RECORDINGS/20140107 ... blabla.wav
and the apache alias is something like this: Alias /SALE_RECORDINGS/ "/mnt/nas/Vicibox/recordings/"


--edit--
geoff3dmg: no, its seams like the NAS only got support for CIFS, SMB, AFP as far as I can google
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Call recording to NAS mounted on single server

Postby glenewhittenberg » Thu Jan 09, 2014 1:01 am

Thanks! As you said it does not support FTP or HTTP. I was thinking of leaving the mnt point at its current location /mnt/drobo and run a script that moves the recordings based on date for archival. The question then is I could write some php code for managers and use alias in Apache to view/play the recordings, but what is the naming convention of these recording files? This way I would not have to edit any of the vici code. I don't have any recordings to look at as they have recording off at this time. if its in a db table I could use that and pull the file name from there.

Working on little sleep for a week now as i get all the tweeky stuff finished. So far it is working awesome. I wish they would let me crank it up for a performance test. Any way to do this and not actually make calls? I appreciate the help, input, and any recommendations.
Single Server:
SuSE 12.3 (x86_64) : ViciBox v.5.0.2-130821 : Asterisk 1.8.26.1-vici : astGUI 2.8b0.5 : SVN = 2088
Mysql 5.5.33-MariaDB-log : Xeon E5-2620, 4x 8GB ECC 1600 RAM, 4x 2TB WD RE4 SATA3 RAID10
glenewhittenberg
 
Posts: 54
Joined: Fri Jan 03, 2014 1:15 am

Re: Call recording to NAS mounted on single server

Postby DomeDan » Thu Jan 09, 2014 5:05 am

There is a campaign setting to customize the file-name layout, here is info from the help section:
Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN INGROUP CUSTPHONE FULLDATE TINYDATE EPOCH AGENT VENDORLEADCODE LEADID. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. Te resulting filename must be less than 90 characters in length.


the code don't need to be in php, I used it because I was most familiar with that,
you can look at the code in AST_CRON_audio_3_ftp.pl and modify it to move files in the directories instead of using ftp

you can use /etc/apache2/conf.d/viciarchive.conf or just copy it and use a other name like I did and change the path
Code: Select all
Alias /archive/ "/home/archive/"

<Directory "/home/archive">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
   <files *.mp3>
      Forcetype application/forcedownload
   </files>
</Directory>


The way I programmed it is that it takes only SALE files and skip the rest, runs every night, and got a cronjob to delete recordings in /var/spool/asterisk/monitorDONE older then 14 days, and I use ALLFORCE
I will probably rewrite my script to use perl instead and be more like the vicidial script, when I'm done and if I'm happy with the result I will post it on the issue tracker, but the script is not high priority

About performance test, there is a old document about it http://download.vicidial.com/vicidial/a ... ESTING.txt have never tried it but have been wanting to for some time
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Call recording to NAS mounted on single server

Postby williamconley » Thu Jan 09, 2014 10:58 pm

DomeDan wrote:The first and the most recommended way is to use the ftp method made by the vicidial team:
AST_CRON_audio_3_ftp.pl

Then you need to enable ftp on your NAS...
I just looked up that Drobo 5n and it seams to only support CIFS, SMB, AFP.. ok then that option is out of question.

The next method is to mount a CIFS/SMB share directly on /var/spool/asterisk/monitorDONE/GSW/

Very close, but my next attempt would be to mount the NFS in /home/xxxx where xxxx is the ... ftp recording folder! Then set up ftp and the only time the NAS would need to be up is during ftp transfer OR whenever you want to actually listen to a recording.

Basically you would use THIS server (not the NAS drive, but this vicidial server) as the FTP server (standard capability in Vicibox since 3.X) which would also double as the "archive" audio source for http (to listen to the recordings after archiving them). So ... recordings are made all day long and offloaded as they happen (if NAS is always up) or offloaded after hours (if NAS is on a schedule). But recordings will only be available when NAS is online, of course. None of this is an odd setup except the mounting of the drive in the ftp location (which is a normal linux operation, not related to Vicidial and should not in any way interfere with Vicidial operations EXCEPT for I/O time during transfer).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20438
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)

Re: Call recording to NAS mounted on single server

Postby glenewhittenberg » Fri Jan 10, 2014 2:33 am

I never thought of using the vici server as the FTP archive. Using the mounted NAS as the path should take care of it. i could use scripts and cron to mount, transfer, and then remove ones older than 14 or maybe even 30 days. Does your script do any checking to insure the move happened before removing from the original location? I would hate to have not moved them then delete them. Can you share that with me, the script? Thanks!
Single Server:
SuSE 12.3 (x86_64) : ViciBox v.5.0.2-130821 : Asterisk 1.8.26.1-vici : astGUI 2.8b0.5 : SVN = 2088
Mysql 5.5.33-MariaDB-log : Xeon E5-2620, 4x 8GB ECC 1600 RAM, 4x 2TB WD RE4 SATA3 RAID10
glenewhittenberg
 
Posts: 54
Joined: Fri Jan 03, 2014 1:15 am

Re: Call recording to NAS mounted on single server

Postby geoff3dmg » Fri Jan 10, 2014 5:06 am

The FTP transfer script, AST_CRON_audio_3_ftp.pl, is very paranoid. It will check if the FTP server is up (pingable) and will verify the upload worked (especially if you use the --ftp-validate option with the script) before it changes the url in the recording_log table. Call recordings are removed by a seperate cron job, so you have a window of opportunity (I believe a week for mp3s and 24hrs for wavs out of the box) to do alternative backups/recover call recordings from the dialling server if anything goes wrong.
Vicibox 5.03 from .iso | VERSION: 2.10-451a BUILD: 140902-0816 | Asterisk 1.8.28.2-vici | Multi-Server | Amfeltec H/W Timing Cards | No Extra Software After Installation | Dell PowerEdge 1850 | Pentium 4 'Prescott' Xenon Quad @ 3.40GHz
geoff3dmg
 
Posts: 403
Joined: Tue Jan 29, 2013 4:35 am
Location: Lancashire, UK

Re: Call recording to NAS mounted on single server

Postby DomeDan » Fri Jan 10, 2014 7:26 am

Williamconleys idea is clever, make the server ftp to itself! it sounds weird but its a good way to solve this

Sure I could give you my script but its not very nice, hard-coded database login and folders etc, I would rater rewrite it and use /etc/astguiclient.conf so its easy for you and others to just plug and play :)
my current script only copies the files so they will still be kept in minitorDONE until a cron-job deletes those files, so you will have 14 or 30 days before its deleted.
and yes my script checks if the file exists on the NAS after it was copied there.
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Call recording to NAS mounted on single server

Postby williamconley » Fri Jan 10, 2014 10:16 pm

Actually, we have a lot of client machines ftp to themselves as a "we'll build an ftp server later" option when they add a 1T extra hard drive. If they ever choose to build an archive server ... all they have to do is Move the Drive and reconfigure dns (be sure you use dns to get to the files at the new location ... and make it a dns that can move without interfering with sever operations! Even if it is internal/192.168.x.x!).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20438
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 74 guests