Forum Moderators: coopster

Message Too Old, No Replies

Voicemail to FTP

         

deedrit

8:23 pm on Jul 25, 2007 (gmt 0)

10+ Year Member



I use a voicemail service with multiple extensions. When a voicemail is recorded, it sends a .wav file to my ROOT directory in FTP server. All extension voicemails are forwarded to that 1 FTP server\'s ROOT. The file format is T007-2672952789X101-32412646452951643.wav.

I am looking for a script to detect when these files are recieved by FTP and rename the file format to read 2672952789X101.wav(also making sure to rename with the correct phone extension in the filename, X101, X102, X103, etc.) and put the file from ROOT to AUDIO directory. Also making sure to remove original file from ROOT.

Demaestro

9:15 pm on Jul 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you by chance using Nortel software?

Habtom

6:09 am on Jul 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am not sure if you can get a script as such, but you can write one yourself.

I am looking for a script to detect when these files are recieved by FTP

You can put a php script on your cron to run every one hour or so checking if there is a new file.

If the file name format is always the same, you can do the following to get it renamed

> loop through the filenames
> Get filenames with two "-" in them.
> explode the file name
> rename the file with explode['1']

Habtom