[asterisk-users] Voicemail post-processing
Adam Robins
arobins at PharmaCentra.com
Thu Feb 5 16:04:11 CST 2009
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.
More information about the asterisk-users
mailing list