Call Recordings

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Call Recordings

Postby hansg » Sat Jul 23, 2016 10:47 am

Hi,

I have setup a shared storage drive for my server to access.

I want to send the recordings that have been converted to MP3 to this folder, I also want to set this shared drive to be where the recordings are accessed from when I click on the link to download the recording file.

What is the best way to do this? I have tried a couple of methods myself with varying levels of success but not got it working as of yet.


Many Thanks

Scratch Install ViciDial
Cloud Server - Dual Core - 2GB DDR3 - 80GB SSD
VERSION: 2.12-555a
BUILD: 160508-1948
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby hansg » Sat Jul 23, 2016 1:49 pm

I will also add that I have mounted this shared storage (/mnt/nfs).
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Sat Jul 23, 2016 1:55 pm

Mount that shared storage as /home/archive

Then configure FTP to use that folder as the base (which is normal). Then when you use the Vicidial Manager's Manual to configure FTP for client audio recordings and the destination for backups, the results will be seamless.

Remember to test ONE audio recording before you activate the system.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Sat Jul 23, 2016 3:42 pm

Thanks.

I don't currently have the manager manual, although I do plan on buying in the future.

Could you possibly tell me how to set up the ftp properly for my nfs please.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Sat Jul 23, 2016 4:08 pm

There's a free version at EFLO.net. The link isn't as colorful as the paid version, but it is there. LOL

Once you mount the nfs in the proper location, the rest of the ftp configuration is pretty standard. If I recall, it's in the manual.

But there will be some portions of the ftp configuration that are dependent upon your OS and version of FTP server. Which would be "standard" if you had installed your Vicidial system with the Vicibox .iso (from Vicibox.com) instead of "from scratch". Why did you NOT use Vicibox? 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Sat Jul 23, 2016 4:22 pm

I have installed from scratch as I do not have access to my cloud server to use an iso.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Sat Jul 23, 2016 4:33 pm

Fair enough .... but let's be clear: "Cloud server" is a bit vague.

If you're leasing a "VPS" (virtual private server) which is not technically a "cloud" server, just a virtual server in a hosted facility, that's bad. If you're leasing a Physical server in a hosted facility, that's cool, but still not cloud. If your server is not actually a single server but using shared resources from a cluster of powerful servers where you are simply leasing "power" from each of the available cluster types, that's "cloud", but Vicidial doesn't run there. LOL

For those who believe "Cloud" is "It's not in *my* office, so it's in The Cloud" it becomes a challenge to understand what you actually have, since at that point the entire universe outside your office is "The Cloud". LOL

Once we find out what you are really leasing, perhaps someone will pop in with "But you CAN use an .iso at that facility! Here's how you do it ...". :)

I say this because those Mysterious Cloud services are often overbilled and (in the end) turn out to be less cost-effective than simply leasing a server at a hosted facility. The challenge is scaling up without blowing away Virtual Processors and of course the "wow, my server sucks mid-afternoon every day" (which would coincide with everyone trying to share the same virtual host's processor with you). Add to that the fact that Vicidial will not run reliably with more than a few phone calls in a virtual environment ... and whenever someone says "cloud", I like to dig deeper and be sure they don't spent six weeks building a Vicidial environment they'll never be able to deploy with more than two agents. Virtual is great for testing and development (vSphere, Proxmox and VMware and Virtualbox are all free or have at least one free Version), but for production you must have Hardware.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Sat Jul 23, 2016 7:06 pm

I have what I think you are describing as a cloud physical server. I have 4 installations currently and each can handle at least 20 agents without any issues so far. the plan is to use this shared storage for each servers call recordings and store them all in one place.

I have searched everywhere for a method of doing this but can't seem to find much. Also can't see anything in the free manual regarding ftp settings.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Sat Jul 23, 2016 7:41 pm

Have a gander at the Vicibox configuration settings. The concept is that ALL you need is an FTP server that also has a web server built in. Probably good to also have a bit of security involved to avoid "bad people" seeing the recordings.

Code: Select all
/usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --help
/usr/share/astguiclient/ADMIN_backup.pl --help


The system is designed to allow the recording ftp script to push the recordings (every few minutes) from each of the dialers to the ftp server. During this transfer process, the link in the Vicidial admin pages for each recording is altered to refer to the new home of the file. There's even and ftp2 script to mirror these files to a second server so you don't have to bother with a mirror.

The FTP server in question does NOT need to be in any way related to any of the Vicidial servers. As long as the Vicidial servers have the ability to hit the ftp service and copy files, and those files (based on their landing location) are available via Web, then the system can work. One FTP server can provide this service for ANY number of Vicidial servers and/or clusters.

Perhaps it would be cool if you built a Virtual Vicibox server and put it in service including the ftp processes and made a few recordings .. and then fired up the ftp processes according to how Kumba built the system to run in Vicibox. All in one server also includes the FTP role during installation. That may help you understand (without spending any $$).

Alternately, it's a fairly cheap add-on ($50 per server, max, to SEND to the FTP server). I can't quote on configuring the ftp server itself, as they are all different and there are lots of them. However: for this server virtual is fine, but having that server in your physical location is often useful for security purposes. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Sat Jul 23, 2016 8:39 pm

Thanks for the response. I hear what you are saying, but I'm still wanting to use this nfs mount as my directory to save the recording to.

I have played about with /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl and /etc/astguiclient.conf...

My recordings are being saved to the correct folder in the shared drive but they are wav files when they should be MP3 and also they cannot be opened from the recording download link on the admin interface. The requested URL /RECORDINGS/20160724-022701_xxxxxxxxxxx-all.wav was not found on this server. replaced number dialled with xxxxxxxxxx.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Sun Jul 24, 2016 2:05 pm

did you mount the nfs file share in the /home/archive directory (or another folder that is web accessible and ftp accessible)?

then you have to work out the precise location of the file vs the precise location the web server expects it to be, and modify the ftp variables in the astguiclient.conf file to make them match.

i can walk you through the baby steps, if you need such a walk through. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Sun Jul 24, 2016 7:08 pm

I didn't have a /home/archive directory but I have now created that directory and mounted the drive there. I had /home but it only contained /home/asterisk which was empty.

If you could provide me with the "baby steps" that would be amazing lol.

Your help is much appreciated.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Sun Jul 24, 2016 7:28 pm

I'm not sure how baby-ish they need to be, but here we go:

Can you configure FTP on that server and then configure it so that the FTP server has one user who uses that new folder as their "home" folder? And then, of course, log in via "ftp localhost" as that ftp user and write/delete files and folders (to confirm success)?

Since you don't have Vicibox, and FTP service is different for each OS, I hope I don't have to walk you through that ... 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Mon Jul 25, 2016 12:40 pm

OK so... some progress has been made.

I have setup FTP Server on my vicidial server.
Set up a user who has access to the ftp folder. which is linked to /home/archive
I can access the directories by going to ftp://serverip
I can create directories for ftp but when i try and place any files in them, for example a text file, It doesnt seem to work. I think it may be a permission issue but not sure how to solve it.

Thanks William.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Tue Jul 26, 2016 11:32 pm

One does not "go to" an ftp site. One logs in via the ftp protcol using "ftp serverip" at the command line or by using an ftp client software package. The ftp client package will want the IP, user, and password so you can log in as the ftp user. This will only work, of course, if the ftp SERVER package is installed on the server in question.

WinSCP is a generic ftp client for windows. Also has other useful tools. But your best bet would be at the command line:
Code: Select all
ftp localhost

It will then ask for your username and password in whatever method your client/server handshake requires.

What OS is your server again?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby hansg » Wed Jul 27, 2016 11:45 am

Hi Wiiliam,

Sorry, reading that back I worded that poorly.

I have been working on it today and managed to make a good bit of progress.
I have the ftp working and I can access the recordings which is great! :D
The only issue I am left with is that the shared drive that I have connected and mounted to the /home/archive folder does not seem to be getting used. The recordings are still local.

Can you provide any insight on why this would be the case. I realise this is no longer vicidial related as such but it would be a huge help.

Thanks.


Edit to add... I am using Centos 6
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby hansg » Wed Jul 27, 2016 3:38 pm

OK so...

I almost had it working earlier there and then I had to wipe it and start again because i screwed something up.

I have reinstalled the vsftpd server and created a user. I am now having an issue where I can not get access to ftp with the user I have made.

Code: Select all
ftp localhost
Name (localhost:root): xxxxxx
331 Please specify the password.
Password:xxxxxx
500 OOPS: cannot change directory:/home/archive/


Once I get this permission issue sorted I think I can sort it from there. As I said I had it 99% working earlier and then something went wrong.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Call Recordings

Postby williamconley » Fri Jul 29, 2016 11:40 pm

Permissions issue, most likely. The FTP service must have permission to read/write the folder in question. This could be accomplished by adding the ftp service's user to a group that can control that folder or by changing the folder's group to one the ftp user is already in ... and by "the ftp user" I refer to the user who owns the ftp process that runs the vsftp service. Htop will rat that out for you.

There are many ways to skin that cat, but in the end: That user must have access to read/write that folder (and maybe execute, don't remember) and will probably at least need to view all the folders below it to get there in the first place. Usually you can turn on logging for ftp to see the actual hiccup in a log file.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call Recordings

Postby mphilayala » Mon Aug 15, 2016 4:10 pm

Hi, hansg

I happen to view your tread here while having the same/somewhat similar issue.

The way I understand it you want to store and access the recordings at a shared/mounted drive
you already made the mounted drive as document root for your FTP at /home/archive correct?

This is quite long and I still might not be able state all completely here so just let me know which method you want to try.

Now if enabling AST_CRON_audio_3_ftp.pl changes the recording link/LOCATION to ftp url as supposed to example LOCATION is = ftp://yourftphost/recordingsdirectory/ then you can access the recordings at the mounted drive just fine.

And note to pass --MP3 if you want the script to store MP3 and now .wav
/usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --MP3

Else if AST_CRON_audio_3_ftp.pl does not work for you and having problem for some reason like in my case where ftp is located at VPS internal ip and behind firewall(NAT) then most likely you just need to configure the ftp commands AST_CRON_audio_3_ftp.pl adding the line "passive" example below.
$ftp = Net::FTP->new("$VARFTP_host", Port => $VARFTP_port, Debug => $FTPdb);
$ftp->passive("passive");
$ftp->login("$VARFTP_user","$VARFTP_pass");
$ftp->cwd("$VARFTP_dir");
Just find those lines on the AST_CRON_audio_3_ftp.pl script and add $ftp->passive("passive"); as shown above.

Now if you want other method to store your MP3 files to shared/mounted drive and access recordings on that location then you can just pass as copy command from /var/spool/asterisk/monitorDONE/MP3 to /mnt/nfs/

Additional method needed though to create a script and schedule it at crontab
but the copy command from MP3 files to mounted drive should like below
like cp -d /var/spool/asterisk/monitorDONE/MP3/* /mnt/nfs/

create a file at any location you can call say at /home/backup-script
sudo nano /home/backup-script
enter below and save
#!/bin/bash
cp -d /var/spool/asterisk/monitorDONE/MP3/* /mnt/nfs/

sudo chmod 755 /home/backup-script

crontab -e
and add at the bottom

#back-up script
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /home/backup-script

Using this method you need to enable below script at crontab just uncomment the script.
since you will have same files at two locations /var/spool/asterisk/monitorDONE/MP3 and /mnt/nfs
make sure to change the location as show below since the default location is just /var/spool/asterisk/monitorDONE

### remove old recordings more than 7 days old
24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/MP3 -maxdepth 7 -type f -mtime +7 -print | xargs rm -f

now to make your site run a redirect to /mnt/nfs if files are already deleted at first location and will now go to /mnt/nfs/ to look for the files.

Edit the .conf file where you added below Alias rule.
httpd.conf, apache2.conf or 000-default.conf depends on where you declare this rule.

edit you original conf file to

Alias /RECORDINGS/MP3/ "/var/spool/asterisk/monitorDONE/MP3/"

<Directory "/var/spool/asterisk/monitorDONE/MP3">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /mnt/nfs/$1 [R=302,L]
# if you want to redirect to ftp address of /mnt/nfs/ the use below " just choose one from the # two RewriteRule
RewriteRule (.*) ftp://user:pass@yourftphost/directory/$1 [R=302,L]
<files *.mp3>
Forcetype application/forcedownload
</files>
</Directory>

Sorry I know its a lot but it works perfectly. just let me know if I need to go and futher explanation.

Hope this helps
mphilayala
 
Posts: 1
Joined: Mon Aug 15, 2016 2:55 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 144 guests