I am in the process of integrating my asterisk system with a webserver and I’m looking to understand the rules for voicemail files in the /var/spool/asterisk/voicemail directory. In particular, I think I can easily inspect a voicemail box to search and retrieve messages, however, what are the rules that I need to follow to delete a voicemail file? Is it sufficient to simply delete the set of related files (i.e., msg0001.txt, msg0001.wav, msg000.gsm, msg0001.txt) or do I need to maintain the other files in the directory so that the sequence of filenames always starts at zero and continues sequentially? For each voicemail directory, is there some index file that I also need to maintain?
I’m using Java and JSP’s to implement my webserver. Are there any Java libraries that have been previously developed for interfacing with Asterisk?