Email notification of Missed call

Nem
Posts: 1
Member Since:
2006-09-10

Hi,

I have setup email notification of voicemails on my box, but I would also like to have email notifications of Missed calls for the following two scenarios.

- Missed calls that didnt wait for voice mail to start.
- Callers that went to voice mail but didnt leave a message.

Can someone give me a heads up on how to do that.

I have googled around but I didnt find a working solution.

Regards,

Darren



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

Darren,

Any luck with this? I need this same feature!



pburden
Posts: 9
Member Since:
2006-09-04
Re: Email notification of Missed call

This would be very handy, please let me know if you get this working :0)



Zaphod
Posts: 162
Member Since:
2006-05-31
Re: Email notification of Missed call

This would take some pretty heavy hacking of the dial plan to insert wedges between the failed dial and insertion of records into the CDR. Even more difficult will be differentiating between those that left V-mail and those that did not.
I don't think this is impossible, but the more I think about it, the less I think it is possible via dial plan. This is likely going to need mods/changes to the voice-mail app.

--

-Mike :-D



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

I would be happy with receiving notification of all calls. Who cares if I get double notification with the ones that do leave voicemail. I am just interested in getting the caller id of all incoming calls emailed to me whether or not a message is left.



revco
Posts: 516
Member Since:
2006-09-04
Re: Email notification of Missed call

I would concur that you're not going to get this feature "out-of-box"...but the dial plan could likely be hacked to provide such functionality.

I assume that using phones with call logging capabilities (missed calls, placed calls, answered calls) is not enough for your application? My Cisco 7960's do all the tracking for me and I can just cruise through the call logs and call back whomever I like.



Zaphod
Posts: 162
Member Since:
2006-05-31
Re: Email notification of Missed call

I couldn't help myself, I had to dig a little deeper on this. A couple of options:

Browse through the extensions.conf file and you will see a couple of areas that could be nice for insertion of code. Look at [macro-dial] and [macro-vm] and a series of subsets of that code. You could do something like:

exten -> X,X, system (echo 'A call was received by ${CALLERID(number)} ${CALLERID(name)}' | mail yourcellphone@yourprovider.com)

Assuming you cell phone/pager can receive text messages/pages this way. replace X,X with appropriate line numbers and extensions.
Note that this is a VERY HEAVY HANDED HACK and at best will page you with every call that comes into the system, and at worse, completely hose your dial-plan. I have not tested insertion of this type of code in any area like this.
Having said all of that, I did something very similar in my ext-fax to page me (text message) on incoming faxes. It worked flawlessly, but I received notification on ALL faxes, not just specific DIDs, etc.
Lastly, if you are looking for specific notifications based on user/extension then it may be possible to use some combination of follow/find me and the custom app context. this way you could create custom apps for each user/extension. I only briefly putzed around with this, but I don't know enough about setting up the custom app to make it work. My little bit of playing around broke the ability of that ext. to get voicemail. Someone with a little more knowledge of the freePBX structure might be able to make that work.

--

-Mike :-D



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

I am fairly new to Trixbox but will play with your idea. Basically I using Trixbox for a Real Estate office. I have (1) toll free DID that is used for a 24 hour listing hotline. You call the number and enter an extension and the description of the home is read to you. You then have the option of leaving a message or pressing 0 to reach me.

What I want to have happen is for the people that do not leave a message or press 0, I want the caller ID of their call to be emailed to me. It is okay if I get all the caller ids emailed to me. (voice mail and pressing 0) All caller ids from the one specific DID need to be emailed to one specific email...



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

Okay Mike,

I have tries what you mentioned above but i have not been able to get anything to happen. i am not even sure if i put it in the right place! Also i am not sure what to put in the place of x,x (extension and line?) If you wouldn't mind giving a little more detail.



Zaphod
Posts: 162
Member Since:
2006-05-31
Re: Email notification of Missed call

Ok. I was going to show you my code-snippet I used to use that text messaged my cell phone when I rec'd a fax. However, That code is no longer in there since I've upgraded/migrated servers. (I'm using notification via hylafax now ... didn't need to maintain that code). So, let's just try and hack where I think this code should go.

[macro-exten-vm]
exten => s,1,Macro(user-callerid)
exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] | $["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)
exten => s,n,GotoIf($["${CHANNEL:0:5}" = "Local"]?dolocaldial,1) ; if the channel is Local
exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})
exten => s,n,GosubIf($[$["${DIALSTATUS}"="NOANSWER"] & $["foo${CFUEXT}"!="foo"]]?docfu,1) ; check for CFU in use on no answer
exten => s,n,NoOp(Voicemail is '${VMBOX}')
exten => s,n,GotoIf($["${VMBOX}" = "novm"]?s-${DIALSTATUS},1) ; no voicemail in use for this extension
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,System(echo 'Call went to Voicemail from ${CALLERID(name)} - ${CALLERID(number)}' | mail <a href="mailto:YOURCELLNUMBER@YOURPROVIDER.com">YOURCELLNUMBER@YOURPROVIDER.com</a>)  
exten => s,n,Macro(vm,${VMBOX},${DIALSTATUS})

A couple of Interesting References:
http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf
http://www.voip-info.org/wiki/index.php?page=Asterisk+priorities
Those links will help explain the syntax of the dialplan.

the new line here is the one with the System() call. I've placed this in the [macro-exten-vm] context of extensions.conf. What this *SHOULD* do is send an email to YOURCELLNUMBER@YOURPROVIDER.com with the callerid(name & number) of the caller just *before* dumping the caller into the v-mail system. Thus, if they do or don't leave a message, you should get a message.
Also be sure that you have your mail system properly set up to do this. If you have not configured sendmail or if you aren't set up as a fully qualified domain, etc. the various spam filters of mail servers around the net will reject your message. For me, I have sendmail configured to masquerade my domain name, and I'm using a smart host to have the asterisk box send mail out through my mail server rather than trying to deliver mail itself directly.
Now the original question was to parse out callers who did not go to voicemail, those that left messages, etc. This does not accomplish the entire goal. However, if you study this a bit, and then start following the logic/progression of the dial plan, you should be able to find appropriate points to insert your code.

--

-Mike :-D



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

Mike,

Thanks! That is awesome. Now I just need to tweak it a little more. I want it to show the Extension Name in the email and have it only respond when only when called from a certain DID. Not all of them...



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

Okay so everything was working fine. I was getting email notification every time someone went in to voicemail no matter if they left a message or not... I upgraded FreePBX to 2.2.0rc1 and now it does not work. I noticed that the macro-exten-vm file changed after the upgrade so I put the entry you suggested where I thought it would go. Anyway, now I do not get notifications... Here is the new file after the upgrade.

[macro-exten-vm]
exten => s,1,Macro(user-callerid)

; Don't go to destinations like vm if NODEST is set
;
exten => s,n,Noop(CAME FROM: ${NODEST})
exten => s,n,Set(RRNODEST=${NODEST})
exten => s,n,Set(_NODEST=)

exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] | $["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)

; If NODEST then bypass voicemail regardless
;
;exten => s,n,GotoIf($["${CHANNEL:0:5}" = "Local"]?dolocaldial,1) ; if the channel is Local
exten => s,n,GotoIf($["foo${RRNODEST}" != "foo"]?dolocaldial,1) ; don't do voicemail

exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})
exten => s,n,GosubIf($[$["${DIALSTATUS}"="NOANSWER"] & $["foo${CFUEXT}"!="foo"]]?docfu,1) ; check for CFU in use on no answer
exten => s,n,NoOp(Voicemail is '${VMBOX}')
exten => s,n,GotoIf($["${VMBOX}" = "novm"]?s-${DIALSTATUS},1) ; no voicemail in use for this extension
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,System(echo 'Extension number ${VMBOX} you received a lead from: ${CALLERID(name)} - ${CALLERID(number)}' | mail myemail@mac.com)
exten => s,n,Macro(vm,${VMBOX},${DIALSTATUS})

; Local channel should try to ring the phone only then come back out
; i.e. it's wrong for it to Answer the call in any way (including Congestion
; and stop the initiating dialplan from being returned to)
exten => dolocaldial,1,Macro(dial,,${DIAL_OPTIONS},${EXTTOCALL})
exten => dolocaldial,n,NoOp(Returned to dolocaldial with DIALSTATUS '${DIALSTATUS}')

; Try the Call Forward on No Answer / Unavailable number
exten => docfu,1,Set(RTCFU=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")})
exten => docfu,n,Dial(Local/${CFUEXT}@from-internal/n,${RTCFU},${DIAL_OPTIONS})
exten => docfu,n,Return

; Extensions with no Voicemail box reporting BUSY come here
exten => s-BUSY,1,NoOp(Extension is reporting BUSY and not passing to Voicemail)
exten => s-BUSY,n,Playtones(busy)
exten => s-BUSY,n,Busy(20)

; Anything but BUSY comes here
exten => _s-.,1,Playtones(congestion)
exten => _s-.,n,Congestion(10)



JamesDW
Posts: 518
Member Since:
2006-06-01
Re: Email notification of Missed call

*** Bump ***

Anyone have any ideas how to use this with the upgraded FreePBX 2.2.0rc1?



GSnover
Posts: 1432
Member Since:
2006-11-19
Man, I have been looking everywhere for something like this...

I am going to try and set it up as an Inbound Context that then falls over to from-trunk - I just want the E-Mail so that I know when anyone calls the Line - I will post what I come up with.

Greg



ddwyer
Posts: 401
Member Since:
2006-06-03
i have this feature

update - we are now extending this functionality , and incorporating this into a small business ERP system.

i wrote a custom script that sends an email after the call has hung up - i set my script to produce an .ICS calendar file so that it imports the calls into outlook calendar automatically , the script can be set to operate on a incoming DID, or on an extension.

i set me "mail_appointment_after_hangup" script to operate on my incomming DID for my business , and it does 2 clever things
[1] sends an email if the call is just not picked up , or the caller hangs up before the call is answered
[2] sends and email if the caller goes to voicemail and doesn't leave a message
[3] sends and email if the caller gets the "after hours" IVR message and hangs up without going any further

this original script has been running on our system for about 18 months , i did discuss this in the forum before . anyhow we have now moved on and enhanced this script will a seperate web interface that tracks all calls and contacts , the new "contact application" is a dumbed down CRM or a smart CDR application it records all voice calls , assigns a reason for the call , and an outcome ie "WIP" or "Complete" i am working on a much better contact management interface at the moment.



GSnover
Posts: 1432
Member Since:
2006-11-19
Yes, I got what is posted here working reliably under 2.6.0.7 -

but it sends out the message ANY time ANY extension hit's VoiceMail - what I want, and will post when I have it is a custom context that you can point a DID at, that will send the E-Mail notification, and then pass it on to the normal processing of the extension, in this case, a VMX locator for a real estate application - they want an E-Mail for EVERY call that calls in on a listing, not just the ones that leave a message - I am getting closer - I will post when I have it working.

Greg



ddwyer
Posts: 401
Member Since:
2006-06-03
yes thats what have

that is exactly exactly what i have. but i would be interested to see how you do it



gsigalas
Posts: 75
Member Since:
2006-11-04
SMS

Well I ve trying to do the same thing with no luck ..
AlI I want to do is to be informed of missed calls via sms ( it can be done using a fastsms agi script) from bayham ..--have to pay for the SMS though.
I m trying to get it done for 4 days now with no luck ..anyone got it working ??
and what if you re apply Freepbx config which overwrites extensions.conf

Any progress ??



magicyes
Posts: 1
Member Since:
2009-05-30
Email notification of Missed call only

hi

anybody had any luck in setting up email notifications only for missed calls?

I am kind of new to this any help or direction on how to achieve this would be very helpful
thank you!



geekdude
Posts: 5
Member Since:
2009-08-03
Email when call answered

I am looking for similar to this, we don't use voicemail as such however, looking at having an email/sms sent when a call is answered with;

CallID
Status (Answered/Missed)
Date + Time of call
Extension Termination Took Place (ie extension that answered the call) - From here were would mail rule it to the appropriate extension etc.

Does anyone have any idea where/how I can do this, I have looked at http://www.theschmandts.org/blog/2007/05/05/email-notifications-f... but could not get it working



gaautomation
Posts: 8
Member Since:
2008-06-09
Email on missed call or no voicemail

I have a client that this would be great for - they have a 24 hour service. We want to make sure if a potential customer hangs up (to many rings or no voicemail) that the tech's get an email with caller id and they can call back to see what is going on. Any progress on this?

Thanks,

Josh



AlexTabs
Posts: 2
Member Since:
2008-08-12
Did you had any luck on

Did you had any luck on making this work?
If yes, please let me know.

Thanks in advance,
Alex



geekdude
Posts: 5
Member Since:
2009-08-03
as a fast and dirty way of

as a fast and dirty way of doing it, what I did was went into Extensions and macro-hangupcall
you can use any variable from the CDR file and simply add it with a , either side of the variable but this is the line, simple add it in the macro,
stop and start the amportal and your up and running

exten => s,n,System(echo TEST "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(start)}","${CDR(uniqueid)}","${CDR(userfield)}" | mail -s "${CDR(start)}"----"${CDR(clid)}" your@emailaddress.com)

from TEST to )}" | is the body of the email, the right hand side from mail -s onwards is the subject line, so if you use an email to SMS service, you could set it up depending on how your email to SMS service works, either main details in subject of email or body, of use the same details in both if you wish.

This does every call, however, the downside is, if you have 3 phones in a queue and all 3 are busy and the queue bounces every 30 seconds, then every 30 seconds or bounce (i.e hangup) then you will get 3 emails (if you have 100 extensions ringing have fun with 100 emails per extension bounce :) ).

Hope this helps.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.