Better way to send VM emails


#1

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…


(Andrew Nagy) #2

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


#3

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.


#4

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.


(Umair Malik) #5

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.


#6

gui -> voicemail -> settings -> externnotify


(Lorne Gaetz) closed #7

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