E-mail notification for missed calls


We are running FreePBX 2.8 with Asterisk 1.4.
One of our users would like to get e-mail notifications for missed calls to his number, i.e calls where the caller has hung up. We are not using voicemail at the moment.
Is this possible to do with FreePBX? I found this page: http://www.theschmandts.org/blog/?p=28 , but I can’t figure out how to implement this in a FreePBX setup. Has anyone done this?

But I have vTiger integrated with PBX In A Flash… Every call we make, no matter what, (inbound, outbound, missed, etc) gets emailed to us…

Like this:


This is a notification that an activity is assigned to you that has been created.
The details are:

  Subject: : Outgoing call from dbradshaw (707)
  Start Date & Time : 04-19-2011 16:25
  Due Date : 04-19-2011
  Status: Held
  Related to: 
  Location : 

Thanks & Regards ,

Hmm, nice request.

For now, all i can think of is to hack into the _custom contexts that FreePBX standards have and follow the h, dialplan and where you get a busy (and what not), run an AGI and send out email based on the email configured for that user. Or straight from the System function within the dialplan with a (mail -s…) Interesting. Might think of writing this :smiley:

This is a function that I have been trying figure out how to implement for a while.

Doug, it appears that you have your system doing exactly what we need. For the benefit of people considering implementing what you suggested, below are two links that will be of value for this integration.


Did you just do a pretty stock install of vTiger? It appears that it is designed to work nicely with asterisk - it can create extensions and the like. Does this cause any conflicts with freepbx? It seems that they may conflict with each other a bit in this respect? Any insight would be appreciated.


I dont remember all the files off hand that we edited for this, as we pretty much overhauled vtiger to suit us. :slight_smile:

This being said though, for just this functionality a stock installation of vtiger is appropriate.

I will go back over my “change notes” to list each file, but right off hand I can tell you that the AsteriskClient.php script is essential for this to work correctly. You can set it up as a cron job or run it in a terminal or browser, just DO NOT forget to run it! That script MUST run for not only the “missed call” emails, but also the “pop up” that will notify the user that a call in coming in, etc. while logged into vtiger… Nifty function also! It pops up with record information and a link to jump to the specified record.

The “default” context that is where the magic happens for Freepbx & Vtiger… Change the context from “default” to “from-internal” to reflect the proper dialing contexts. Also edit the /etc/asterisk/manager.conf file so that vtiger can “login” and communicate directly with FreePBX…

If you want to get really fancy, we have vtiger “logging” each call, inbound and outbound, to the record in vtiger… :slight_smile:

I will check my notes, but I believe a stock install of vtiger 5.2.1 with these edits will do the trick…

Let me know if I can help further… By the way, it works much the same when integrating with VICI Dial, which we have also implemented :slight_smile:


Thanks. I appreciate your input. It sounds like you are a pretty customized, high-end user.

I have freepbx implemented for my office but am pretty unsophisticated on its back end. Any info would be appreciated.

Thanks again,

my skype is dbradshaw79 if i can help, I will. :slight_smile:



vTiger looks interesting, but it would be nice if missed call e-mail notifications could be a stock feature of FreePBX.


I loaded vTiger on a server to see if I could make it work, and it looked promising, but the only problem I encountered is that I could not make it execute a followup sequence with letters an calls and csv exports and stuff like that. Even for the email think we were talking about it appears to be a very custom installation. Correct?

Just wanted thank you for your suggestion.



The email part you are referring to is in the workflows. You have to properly configure sendmail, etc… Then in vTiger you setup the work flows to send when an “action” takes place… hope this helps…


I’ve been experimenting with this as our sales guys would love to know that a warm lead returned a call.

I’ve been looking at http://www.theschmandts.org/blog/email-notifications-for-missed-calls-in-asterisk which seems great and there’s even a script to filter down to just the missed calls by hooking into the h dial plan action. I already have a custom sendrecordingviaemail script, so the email sending is not a problem.

But I am struggling with where to catch the end of call action, as my 2.9 Asterisk 1.8 install doesn’t have [macro-stdexten]. I see it’s just been pushed out of 2.10 http://www.freepbx.org/trac/ticket/4795
Anyone any thoughts in the meantime to help please?