Jump to content

Missed Call to email notification?


Tuly

Recommended Posts

Is there a way we can have missed call to email notification? When someone has a missed call on their extension, the system should send an email notifying the user of the missed call.

i may have asked this ones, it was dismissed as a none important feature, but we keep getting this request

Anyone knows if this will be possible with the new WebSocket manager?




Link to comment
Share on other sites

We show missed calls in our call analytics, not as a real-time notification. I'm thinking for real-time here is what I would do:

Create a webhook using the trigger, "channel_destroy"
the hook fires off code on your server that first delays enough for the CDR to appear in the database (sometimes this could take a few seconds or longer) and then the code queries the CDRs looking for any <in the last say, minute> that are
"hangup_cause": "ORIGINATOR_CANCEL",
or
"billing_seconds": "0", "call_direction": "inbound",
Then, email or sms a notification to the user.
Link to comment
Share on other sites

i see thanks FASTDEVICE, 1 issue i have, if the voicemail picks up and the caller hangs up, the billing seconds will not be 0, and when ever there is a menu, the billing seconds is also not 0,  

So practically you can only Implement missed call to email notification, on Direct DIDs,  that goes straight to a phone and the voicemail does not even pick up, am I right?
Link to comment
Share on other sites

There appears to be five missed call scenarios:
  1. Extension Ringing
  2. Ext. to VM answers
  3. Menu/ Media answers
  4. Menu to Extension Ringing
  5. Menu to Extension to VM answers
Test each scenario and look for how many call legs are identified and the disposition value of the inbound call leg.  
"disposition": "NO_ANSWER",
Link to comment
Share on other sites

    1. Extension Ringing                                 ORIGINATOR_CANCEL
    2. Ext. to VM answers                               NO_ANSWER   
    3. Menu/ Media answers                           ANSWER
    4. Menu to Extension Ringing                   ORIGINATOR_CANCEL
    5. Menu to Extension to VM answers       NO_ANSWER




thats very good, but how can we add the disposition value to the webhook? possible?
Link to comment
Share on other sites

Thanks for doing the testing! The purpose of the webhook is to trigger your code when the channel is destroyed. I'm more acquainted with channel_answer, but I'm guessing channel_destroy will trigger when a call leg is hung-up. This will be your semi real-time hook to query the CDRs for the disposition value. Again, the code should delay enough for the CDR to be present, query for the disposition value, do some check to see if the call_id has already been used (if not, store it), and then notify your client(s).

I don't think the disposition value is contained in the webhook, but here is a very good site to capture that kind of data: http://requestb.in/ and investigate.
Link to comment
Share on other sites

Thanks for the link fastdevice... i have an idea how to do missed call now,

One thing concerns me, it does look that webhooks are not so reliably sent,  as a lot of times I'm doing the same thing,  webhooks will send both legs of the call,  and at other times it will send only 1 side of the call, 
should I rather wait for websocket? when websocket comes out will webhooks still be supportive?
Link to comment
Share on other sites

I find webhooks to be highly reliable, but as mentioned, my experience is with answer. Webhooks is known to fire twice for each trigger, but @Darren states that's by design. However, you mention they sometimes fire with each leg of a call. In which case(s) of the five are you getting a trigger for both legs of a call being destroyed?

as I mentioned before, test each scenario and look for how many call legs are identified and the disposition value of the inbound call leg.
Link to comment
Share on other sites

I was testing on channel_destroy, most incoming calls were getting both legs of the call,
But interesting I can do the same incoming call to a menu and pressing an extension after letting the extension Ring 2 times I hang up the call, I would say it's 50-50, 50% of the time we're getting both legs of the call, for the outside number getting a ' normal clearing' ( the menu picked up) and for the extension were getting originator cancelled, and the other 50% of the time we're doing the same same thing and we're only getting the incoming normal clearing,

I'll play around some more tomorrow, will see
Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...