I am doing this thing… i have to take one attachment .WAV from an email, and take it an put it in the folder that correspond to it extention… (/var/spool/asterisk/voicemail/default/105/INBOX for example…) i could get the .wav with this thing… ripMIME… an whith sox i convert it to .gsm, but my problem is that i have to create the .txt that the asterisk voicemail needs to interpret the message, i mean there is all the information about the mess… i mean, from who, what time, etc etc,

EXAPLE: You Send me an EMAIL with an SOUND ATTACHMENT with (Like a .WAV
file). I nedd to get THAT attachment from the EMAIL, and PUT that SOUND
FILE in the VOICEMAIL FOLDER, and hear it in my PHONE.

So i need to find a way that asterisk recognize that new file like a

example: (this is a real thing… … i have 6 mes…each one have a .txt file…)

root@central:/var/spool/asterisk/voicemail/default/107/INBOX# ls
msg0000.gsm msg0001.gsm msg0002.gsm msg0003.gsm msg0004.gsm msg0005.gsm msg0000.txt msg0001.txt msg0002.txt msg0003.txt msg0004.txt msg0005.txt
msg0000.wav msg0001.wav msg0002.wav msg0003.wav msg0004.wav msg0005.wav
msg0000.WAV msg0001.WAV msg0002.WAV msg0003.WAV msg0004.WAV msg0005.WAV

this is msg0004.txt
root@central:/var/spool/asterisk/voicemail/default/107/INBOX# cat msg0004.txt
; Message Information file
callerid=“Aneury Disipulo” <107>
origdate=Tue Oct 30 06:21:10 PM AST 2007

I need to find a way to generate this file for files.wav that i want to put into this folder…

I just Have 2 weeks for it!!

It should be possible, because there is no index file inside a mailbox so to add a message it should be enough to add the .msg file and the related .txt file in the mailbox directory.
I think you should read the doxygen annotated source code for the app_voicemail.c, you can find it online here:, look for app_voicemail.c in the “File list” and check how a message is added.


Marco Bruni

Oh! yes… the error i get when i try to play a voicemail it apears in CLI> this error:

-- Playing 'vm-messages' (language 'en')
-- Playing 'vm-opts' (language 'en')
-- Playing 'vm-first' (language 'en')
-- Playing 'vm-message' (language 'en')

Nov 14 17:16:06 WARNING[22995]: app_voicemail.c:3868 play_message: No message attribute file?!! (/var/spool/asterisk/voicemail/default/105/INBOX/msg0000.txt)

it mention app_voicemail.c and the fuction play_message…
wow!! Let me check it , and pray!! 15 days left…