Better way to send VM emails

Can someone tell me what table stores Voice mail information?
Are they stored in a DB at all? i found the folder with the files and a txt file with some info…

They are not stored in the database. It’s file driven. voicemail.conf

OK so here is what i figured out…
Voice mails are not stored in DB they are only in files.
when new messages come in they go to: (replace 101 with any extension)

/var/spool/asterisk/voicemail/default/101/INBOX/

My goal was to setup a better way to send voice mail emails with more customization.

I setup a php script which runs on a cron to check the inbox folder for new VM. the messages are in a wav format and accompanied by a txt file with the same name.

I parse the txt file and add the data to a new table which i created on the DB.

for new records i created a new email template and attached the voice mail using phpmailer class.

This enables me to customized full html emails as well as selecting a SMTP server to send from for better deliver ability.

I also added a link to click on in the email which will activate my extension to ring and then call out to the number.
This is done using the same call.php file as used for my Chrome plugin.

A couple of “standard” references to help you

The “horse’s mouth”:-

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Voicemail_id263499.html

Pay attention to odbcstorage, odbctable and particularly mailcmd and externnotify.

A good source of sample code:-

http://www.voip-info.org/wiki/view/Asterisk+Voicemail

and

http://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/I_section12_tt1578.html

I think you could eliminate your cron job and reduce your coding significantly, plus handling extensions with different contexts ( not default) by letting Comedian Mail do all the work for you.

1 Like

I have a question regarding the VM notify emails. I want to add last 5 entries from CDR into the VM email.

I have created a php page/script that can do the job. I just need to understand how should I insert that into the vm notify email. @dicko Hope you can help! I always appreciate/value your input on here on different topics.

gui -> voicemail -> settings -> externnotify

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.