Problems transfering files

I have this problem, I record sound files in asterisk and they are saved in asterisk server, but now i must copy this files to W2K machine, but I dont know, how to do it, it must be done from asterisk, somebody knows, how to do it?, it is possible? or I cant copy files from linux to windows, using asterisk?, please help me, in advance thanks

you won’t be using Asterisk to move/copy files, you’ll be using the underlying OS. google for samba-client (or is it smb-client ?), install this (if not already there) and the rest is fairly easy once you’ve got google on your side.

yes, I’m using asterisk and using the asterisk’s command System to be able to use linux commands, I have installed samba and used it in linux console all is working fine but, I need use samba or something from asterisk to do this task, someone knows how to do it

the easiest solution for me is download winscp for windows
connect to linux box and copy files from /home/user_name
or set up www on * box and download proper files
or use samba

well, as I said, I’ve installed samba, it works fine from linux console, but I really need to transfer this files from my linux server to W2K server using asterisk, what command can i use inside asterisk to do this task?, it is possibel? or from asterisk it cant be done? In advance thanks

voip-info.org/wiki/view/Asterisk+cmd+System

use the same commands in linux you would use from the command prompt as part of an extension/macro/whatever.

you could also use an AGI script if you wanted.

We do copy from one linux box with samba (from shared folder) to diffrend linux box using bash script.
For Your issue it copuld be done by using something like this in dialplan:
exten => s,n,System(/home/asterisk/scripts/copy2w2k.sh ${filename})
where script can looks like (it’s not our original scrip):

#!/bin/bash
# $1 = ${filename}
SOURCE=/var/spool/asterisk/monitor/$1
DEST=/mnt/w2ksharedfolder
# username and password to get access to shared folder (i think it could be used without password)
USERNAME=username
PASSWORD=passwd
SERVER="//w2k_ip_address/shared_folder_name"
# mount shared folder
mount -t smb -o username=$USERNAME,password=$PASSWORD $SERVER $DEST
cp $SOURCE $DEST
umount $DEST

i think that this should work, but i’m not 100% sure. You have to test it yourself. it’s only idea-example.
Good luck!

I would just use FTP to transfer the files, unless you really need Samba or some other method to access files. FTP is built in to most *nixes. I use FreeBSD not Linux and use FTP for file transfers all the time.

.