From: Michel D. <as...@vi...> - 2001-07-01 20:14:11
|
Hi, I installed the VOCP package a while back and I found it quite useful. The only problem I had was that I wanted the messages delivered to me via email. I had no real use for the email interface provided with the package. I am not saying it is good bad or what ever, I just did not wish to deal with the security issues the file clean up etc. I also wanted to be able to forward and retrieve those messages from interfaces such as HOTMAIL etc. In effect this makes a voicemail and a email in essence the same thing. With this patch, I do not need to run a WEB server ! So, I hacked the /etc/mgetty+sendfax/vocp/VOCP.pm file as shown below. I have no pretensions as to the good or bad coding of this hack, it just does what I wanted it to do and I think the idea may be worth expanding. Please notice that in this version of the hack the message files is not removed, only the extra files needed to convert the file to a proper WAV format and post it are removed. If someone takes this idea and makes it more pretty I would love to hear from you. Enjoy! *** VOCP.pm- Mon Apr 9 23:02:23 2001 --- VOCP.pm Sat Jun 30 16:29:52 2001 *************** *** 1768,1775 **** # Actually make the ownership/mode changes chown $uid, $gid, $message; chmod oct($mode), $message; ! ! } umask $oldmask; --- 1768,1789 ---- # Actually make the ownership/mode changes chown $uid, $gid, $message; chmod oct($mode), $message; ! my $wavsg = $message . ".wav"; ! my $pvfmsg = $message . ".pvf"; ! my $pvfsmsg = $message . ".pvfs"; ! ! system( "/usr/bin/rmdtopvf", $message, $pvfmsg); ! system( "/usr/bin/pvfspeed", "-s", "8000", $pvfmsg, $pvfsmsg); ! system( "/usr/bin/pvftowav", $pvfsmsg, $wavsg); ! system( "/usr/bin/metasend", ! "-b", ! "-f", $wavsg, ! "-m", "audio/wav", "-s", $wavsg, ! "-t", $owner, ! "-e", "base64", ! "-S", "10000000"); ! system( "rm", $wavsg, $pvfmsg, $pvfsmsg ); ! } umask $oldmask; |