Mitel Forums - The Unofficial Source
Mitel Forums => Mitel MiVoice Business/MCD/3300 => Topic started by: Twinsen on October 20, 2015, 09:30:26 PM
-
Hey Guys,
I won't bore you with the details why, but I am so close to achieving what I need to do - wondering if anyone knows how it is done - shared my batch file as well in case it helps anyone else
I am writing a batch file which will run every hour from a local machine and pull out new VM recordings\convert to wav and put them on a dropbox, I was almost finished but then ran into the road block where it seems the VM files are obfuscated and it is a requirement that I have the number associated with the VM - sort of how you get it when you do VM to EMAIL and it comes as a WAV
PS, I can not use SMPT the 3300 controller is completely offline
Tools I used;
- WINSCP to handle proper timestamp and better than windows ftp client
- sox for audio conversion
My Main Batch File:
@echo off
echo *
echo * Process Recordings for Processing
echo * Gavan Walker
echo * 21.10.2015
echo *
echo * Grabbing VoiceMail Messages
echo *start /wait winscp /script=commandsv2.dat
echo * Copy Raw files for processing
robocopy c:\temp\raw c:\temp\temp
echo * Renaming Files to Correct readable Timestamps
setlocal enabledelayedexpansion
cd c:\temp\temp
ren *.* *.raw
for /r %%i in (*.raw) do ( C:\sox\Sox.exe -r 8000 -t raw -L -G -e u-law -b 8 -c 1 --norm %%i c:\temp\processed\%%~ni.wav )
FYI if anyone else is interested, the commandsv2.dat contents are:
*YYYY is Voicebox number
*XXX is your Mitel Admin password
option batch abort
option confirm off
open ftp://Gavan:XXXX@192.168.101.2
synchronize -nopreservetime -criteria=none local c:\temp\raw /vmail/d/vm/grp/YYYY
byer
the above scrips retrieves the contents of the VM & then processes to WAV - however I need to get the associated phone number from the recording - the file names: (2 VM examples below);
V56258f55.00c
V562599b3.00d
It is easy enough to get them out, convert them to a wav format -> but how can I get the associated number which left the VM?
Hoping the name just needs to be converted with some basic function.
Any help would really be appreciated.
Cheers
-
Sorry, I don't have a direct answer to your question, but I wanted to thank you for sharing your code.
PS, I can not use SMPT the 3300 controller is completely offline
Well, not completely - you're able to access it from another machine, which could run an SMTP service. There's plenty of free ones around. I'd personally probably run Linux in a Virtualbox VM and do something in there.
Still, programmatically pulling the attachment out of an email might have it's own challenges depending on how you approach it.
-
I hope you can get this to work.
I was thinking of something similar but my thought was to have each mailbox email it to a linux server and then have it forwarded from there.
I can see the problem of not knowing which mailbox a message belongs to. I don't know a way around that.
Ralph
-
I use a MSL server to do this, just install MSL,doesn't have to be licensed, on a box and use it as an email relay... works well.
-
Ace,
Did you ever think about trying to convert that wav file to Speech to Text or to MP3 while in transit?
Ralph
-
Ace,
Did you ever think about trying to convert that wav file to Speech to Text or to MP3 while in transit?
Ralph
No, but we do this when either there is no easily accessible email server, or the phone system cannot be on on a network with direct internet connection, but it's been a while. We just use it as a email relay.