Page 1 of 1

Transfer voice files via FTP to another Goautodial server

PostPosted: Wed Jun 24, 2015 5:01 am
by scenarist
I read all topics about transfering voice files via FTP to another server but I am definetly so confused and there is not any step by step succesfully instruction how to do it. :(
My situation is :
I have Goautodial 3.3 server (Server A) with local ip: 192.168.2.170 and I want to transfer via cronjob all voice .mp3 files to another Goautodial 3.3 (Server B) on public ip : 188.X.X.X.
I installed VSFTPD on both server.

@william in manager manual I can not find any instruction about ftp transfer!

I know for scripts

AST_CRON_audio_3_ftp.pl
AST_CRON_audio_3_newftp.pl
AST_CRON_audio_4_ftp2.pl

and for /etc/astguiclient/


Please kindly suggest me, what should be my next step after installed VSFTPD server?

Re: Transfer voice files via FTP to another Goautodial serve

PostPosted: Wed Jun 24, 2015 8:57 pm
by williamconley
Verify your credentials for vsftp work. You must be able to upload a file, create a folder, and delete a file. Once that is done you also need to be able to surf to a file you uploaded via web browser.

Once you have that, your VSFTP server is really considered installed and functional. Next up, getting Vicidial to SEND.

For this all you need is the BASE URL, ftp user, ftp password, and server IP to send files. Then you edit the /etc/astguiclient.conf file to put these credentials in the "FTP recording archive connection information" section. These are the credentials that will be used by the AST_CRON_audio_3_ftp.pl file.

Then you execute AST_CRON_audio_3_ftp.pl with "--help" to see your options. One of those options is a "file limit". Instead of 1000, you'll want to execute it manually with a limit of ... ONE and with --debugX so you can see the file in question for testing. When you execute it, you can then verify that single file transferred and that it's link has been properly updated to the new location.

Simple, right? (We only charge $50 per server for this, so it's not that hard, but not as simple as a carrier configuration ....)

PS: Sometimes you have to create the "RECORDINGS" folder at the base of the ftp server directory, as Vicidial may not be able to do so. And be sure permission are set properly so the FTP user can manage that folder after it's created ... best to create it IN FTP if you can to be sure).

Re: Transfer voice files via FTP to another Goautodial serve

PostPosted: Thu Jun 25, 2015 2:31 am
by scenarist
Thanks @williamconley

For the beginning ftp succesfully work via console and via web

[root@dialerdialer ~]# ftp 188.X.X.X
Connected to 188.X.X.X (188.X.X.X).
220 Welcome to DialerDialer testing
Name (188.X.X.X:root): XXXXXXX
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>


Now I am going to try script on my server A, as you explain me....

Re: Transfer voice files via FTP to another Goautodial serve

PostPosted: Fri Jun 26, 2015 4:03 am
by scenarist
In second step I edited on server A /etc/asguiclient as follows:
Code: Select all
# FTP recording archive connection information
VARFTP_host => 188.x.x.x
VARFTP_user => xxxx
VARFTP_pass => xxxx
VARFTP_port => 21
VARFTP_dir => RECORDINGS
VARHTTP_path => http://188.x.x.x


And run script
Code: Select all
[root@go astguiclient]# perl AST_CRON_audio_3_ftp.pl --debugX

----- DEBUG -----


----- SUPER DEBUG -----

/.asterisk_history 122
/.autorelabel 0
/.bash_history 132
/.autofsck 0
/.asterisk_history 122


|select recording_id,start_time from recording_log where filename='.asterisk_history' order by recording_id desc LIMIT 1;|
||2015-06-26|.asterisk_history|     ||
Net::FTP>>> Net::FTP(2.75)
Net::FTP>>>   Exporter(5.58)
Net::FTP>>>   Net::Cmd(2.26)
Net::FTP>>>   IO::Socket::INET(1.29)
Net::FTP>>>     IO::Socket(1.29)
Net::FTP>>>       IO::Handle(1.25)
Net::FTP=GLOB(0x1dc04570)<<< 220 Welcome to testing ftp
Net::FTP=GLOB(0x1dc04570)>>> user testftp
Net::FTP=GLOB(0x1dc04570)<<< 331 Please specify the password.
Net::FTP=GLOB(0x1dc04570)>>> PASS ....
Net::FTP=GLOB(0x1dc04570)<<< 230 Login successful.
Net::FTP=GLOB(0x1dc04570)>>> CWD RECORDINGS
Net::FTP=GLOB(0x1dc04570)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dc04570)>>> MKD 2015-06-26
Net::FTP=GLOB(0x1dc04570)<<< 257 "/home/testftp/RECORDINGS/2015-06-26" created
Net::FTP=GLOB(0x1dc04570)>>> CWD 2015-06-26
Net::FTP=GLOB(0x1dc04570)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dc04570)>>> TYPE I
Net::FTP=GLOB(0x1dc04570)<<< 200 Switching to Binary mode.
Net::FTP=GLOB(0x1dc04570)>>> ALLO 122
Net::FTP=GLOB(0x1dc04570)<<< 202 ALLO command ignored.
Net::FTP=GLOB(0x1dc04570)>>> PASV
Net::FTP=GLOB(0x1dc04570)<<< 227 Entering Passive Mode (188,x,x,x,175,146)
Net::FTP=GLOB(0x1dc04570)>>> STOR .asterisk_history
Net::FTP=GLOB(0x1dc04570)<<< 150 Ok to send data.
Net::FTP=GLOB(0x1dc04570)<<< 226 File receive OK.
Net::FTP=GLOB(0x1dc04570)>>> QUIT
Net::FTP=GLOB(0x1dc04570)<<< 221 Goodbye.

|UPDATE recording_log set location='http://188.x.x.x/2015-06-26/.asterisk_history' where recording_id='';|
Transfered 1 files
/.autorelabel 0


|select recording_id,start_time from recording_log where filename='.autorelabel' order by recording_id desc LIMIT 1;|
||2015-06-26|.autorelabel|     ||
Net::FTP=GLOB(0x1dce4cb0)<<< 220 Welcome to testing ftp
Net::FTP=GLOB(0x1dce4cb0)>>> user testftp
Net::FTP=GLOB(0x1dce4cb0)<<< 331 Please specify the password.
Net::FTP=GLOB(0x1dce4cb0)>>> PASS ....
Net::FTP=GLOB(0x1dce4cb0)<<< 230 Login successful.
Net::FTP=GLOB(0x1dce4cb0)>>> CWD RECORDINGS
Net::FTP=GLOB(0x1dce4cb0)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dce4cb0)>>> MKD 2015-06-26
Net::FTP=GLOB(0x1dce4cb0)<<< 550 Create directory operation failed.
Net::FTP=GLOB(0x1dce4cb0)>>> CWD 2015-06-26
Net::FTP=GLOB(0x1dce4cb0)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dce4cb0)>>> TYPE I
Net::FTP=GLOB(0x1dce4cb0)<<< 200 Switching to Binary mode.
Net::FTP=GLOB(0x1dce4cb0)>>> PASV
Net::FTP=GLOB(0x1dce4cb0)<<< 227 Entering Passive Mode (188,x,x,26,123,39)
Net::FTP=GLOB(0x1dce4cb0)>>> STOR .autorelabel
Net::FTP=GLOB(0x1dce4cb0)<<< 150 Ok to send data.
Net::FTP=GLOB(0x1dce4cb0)<<< 226 File receive OK.
Net::FTP=GLOB(0x1dce4cb0)>>> QUIT
Net::FTP=GLOB(0x1dce4cb0)<<< 221 Goodbye.

|UPDATE recording_log set location='http://188.x.x.x/2015-06-26/.autorelabel' where recording_id='';|
Transfered 2 files
/.bash_history 132


|select recording_id,start_time from recording_log where filename='.bash_history' order by recording_id desc LIMIT 1;|
||2015-06-26|.bash_history|     ||
Net::FTP=GLOB(0x1dbfae70)<<< 220 Welcome to testing ftp
Net::FTP=GLOB(0x1dbfae70)>>> user testftp
Net::FTP=GLOB(0x1dbfae70)<<< 331 Please specify the password.
Net::FTP=GLOB(0x1dbfae70)>>> PASS ....
Net::FTP=GLOB(0x1dbfae70)<<< 230 Login successful.
Net::FTP=GLOB(0x1dbfae70)>>> CWD RECORDINGS
Net::FTP=GLOB(0x1dbfae70)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dbfae70)>>> MKD 2015-06-26
Net::FTP=GLOB(0x1dbfae70)<<< 550 Create directory operation failed.
Net::FTP=GLOB(0x1dbfae70)>>> CWD 2015-06-26
Net::FTP=GLOB(0x1dbfae70)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dbfae70)>>> TYPE I
Net::FTP=GLOB(0x1dbfae70)<<< 200 Switching to Binary mode.
Net::FTP=GLOB(0x1dbfae70)>>> ALLO 132
Net::FTP=GLOB(0x1dbfae70)<<< 202 ALLO command ignored.
Net::FTP=GLOB(0x1dbfae70)>>> PASV
Net::FTP=GLOB(0x1dbfae70)<<< 227 Entering Passive Mode (188,x,x,x,45,17)
Net::FTP=GLOB(0x1dbfae70)>>> STOR .bash_history
Net::FTP=GLOB(0x1dbfae70)<<< 150 Ok to send data.
Net::FTP=GLOB(0x1dbfae70)<<< 226 File receive OK.
Net::FTP=GLOB(0x1dbfae70)>>> QUIT
Net::FTP=GLOB(0x1dbfae70)<<< 221 Goodbye.

|UPDATE recording_log set location='http://188.x.x.x/2015-06-26/.bash_history' where recording_id='';|
Transfered 3 files
/.autofsck 0


|select recording_id,start_time from recording_log where filename='.autofsck' order by recording_id desc LIMIT 1;|
||2015-06-26|.autofsck|     ||
Net::FTP=GLOB(0x1dce4ba0)<<< 220 Welcome to testing ftp
Net::FTP=GLOB(0x1dce4ba0)>>> user testftp
Net::FTP=GLOB(0x1dce4ba0)<<< 331 Please specify the password.
Net::FTP=GLOB(0x1dce4ba0)>>> PASS ....
Net::FTP=GLOB(0x1dce4ba0)<<< 230 Login successful.
Net::FTP=GLOB(0x1dce4ba0)>>> CWD RECORDINGS
Net::FTP=GLOB(0x1dce4ba0)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dce4ba0)>>> MKD 2015-06-26
Net::FTP=GLOB(0x1dce4ba0)<<< 550 Create directory operation failed.
Net::FTP=GLOB(0x1dce4ba0)>>> CWD 2015-06-26
Net::FTP=GLOB(0x1dce4ba0)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x1dce4ba0)>>> TYPE I
Net::FTP=GLOB(0x1dce4ba0)<<< 200 Switching to Binary mode.
Net::FTP=GLOB(0x1dce4ba0)>>> PASV
Net::FTP=GLOB(0x1dce4ba0)<<< 227 Entering Passive Mode (188,x,x,x,139,54)
Net::FTP=GLOB(0x1dce4ba0)>>> STOR .autofsck
Net::FTP=GLOB(0x1dce4ba0)<<< 150 Ok to send data.
Net::FTP=GLOB(0x1dce4ba0)<<< 226 File receive OK.
Net::FTP=GLOB(0x1dce4ba0)>>> QUIT
Net::FTP=GLOB(0x1dce4ba0)<<< 221 Goodbye.

|UPDATE recording_log set location='http://188.x.x.x/2015-06-26/.autofsck' where recording_id='';|
Transfered 4 files
DONE... EXITING

You have new mail in /var/spool/mail/root
[root@go astguiclient]#

and I succesfully transfered one .mp3 file :)
Do I need to run all three scripts or only AST_CRON_audio_3_ftp.pl ?

I must to do next is set cronjob

Re: Transfer voice files via FTP to another Goautodial serve

PostPosted: Fri Apr 08, 2016 7:22 am
by jmathew
is there a ftp script to transfer file as per the disposition against each call.

Re: Transfer voice files via FTP to another Goautodial serve

PostPosted: Sat Apr 09, 2016 2:36 pm
by williamconley
1) Welcome to the Party! 8-)

2) As you are obviously new here, I have some suggestions to help us all help you:

When you post, please post your entire configuration including (but not limited to) your installation method (7.X.X?) and vicidial version with build (VERSION: 2.X-XXXx ... BUILD: #####-####).

This IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "manual/from scratch" you must post your operating system with version (and the .iso version from which you installed your original operating system) plus a link to the installation instructions you used. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600

Code: Select all
head -50 /usr/share/astguiclient/AST_VDsales_export.pl

You should probably have a look at all the scripts in that folder. LOL Most (perhaps all?) can be checked out by asking for help:
Code: Select all
perl /usr/share/astguiclient/AST_VDlist_summary_export.pl --help

And ALL can be checked out by reading the top section using the "head" command above.