[asterisk-users] Voicemail post-processing
Paul Chambers
asterisk at lists.bod.org
Thu Feb 5 16:55:11 CST 2009
Adam Robins wrote:
> I have an application where a caller leaves a voicemail message and then
> I need to gpg encrypt the file before emailing it.
>
> I wrote a perl script to do this, which is executed after a message is
> left, using the externnotify feature in voicemail.conf.
>
> My script has no knowledge of the name of the voicemail wav file created
> by Asterisk (msg000x.wav). So, I retrieve a list of all files in the
> directory and then process all the ones I find. The problem is that if
> another caller is leaving a message at the same time, I am inadvertently
> pulling that file too, and end up emailing it as a corrupt wav file.
>
> Even if I call the script from the dialplan (at the hangup priority)
> instead of using externnotify, I think I would face the same issue
> because I cannot control the naming of the voicemail wav file. If I
> could select the name of the file to be written, or query the
> Asterisk-selected name as a system variable after the VoiceMail command
> is executed, I'd be ok.
>
> Any suggestions are appreciated. Thanks.
>
I've not tried this, and it's not a part of Asterisk I'm very familiar
with, so take this with a grain of salt...
Why not override 'mailcmd' in voicemail.conf to point to a wrapper that
gpg-encrypts the email before sending it?
-- Paul
More information about the asterisk-users
mailing list