[asterisk-users] Voicemail post-processing

Philipp Kempgen philipp.kempgen at amooma.de
Thu Feb 5 16:28:10 CST 2009


Adam Robins schrieb:
> 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.

Maybe you could make use of the 3rd parameter to the externnotify
script which is the number of messages in that mailbox.
Stop after processing that many files.


   Philipp Kempgen

-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 



More information about the asterisk-users mailing list