Accessing Voicemail Recording and Call Data

Jan 7, 2014 at 2:39 AM
Hi, I'm trying to find out if it would be possible to get the callers phone number and access to the voucemail recording if the caller leaves a message.

I looked at the MessageWaitingEvent, but didn't see any properties that would give that data. Can this be done using the NewStateEvent?

Great contribution by the way!

Thanks
Jan 7, 2014 at 9:59 AM
Hi, bad news. There's no way from the AMI to get that information. Yes you get notified of a new MWI, but not of the content. Irritating I know.

The only way I can suggest you get round this is to ensure the location of your voice mails on the asterisk server is shared (either by using NFS/Samba or by storing them on shared storage). Each voice mail is stored with a corresponding text file with the caller information in.

MessageWaitingEvent will only give you information about the number of messages in the mailbox.

What ever method you use to get round this, please feel free to share with the rest of us, as I am sure you wont be the only person asking this question.

Skrusty.
Jan 7, 2014 at 11:38 AM

Thanks for the reply Skrusty. I may take a different approach and just use the email that gets sent since there will be a few other challenges.

I do also need to log calls that come into a particular IVR and enter a specific message. Are there any events that would give that data?

Thanks!

Jan 7, 2014 at 11:59 AM
Well, an IVR is really just a dial plan, you could monitor for NewExten events and check the context and priority of the call. If they match that of your IVR, then you can log the call. You can also use the DTMF event to watch for key presses.

Hope that helps.
Jan 7, 2014 at 1:11 PM

Thanks again Skrusty, that does help. What I did notice is that in the NewExten event, it fires multiple times with varying data. Is there an event that fires after the call ends that has all of the call detail. I need items like the DID, realCallerIdNum, Extension, etc.

Thanks!

Jan 7, 2014 at 1:16 PM
No, if you want to model a call, you'll need to do it yourself. It's a common requirement when writing against the AMI to want to model calls. I wish someone would write a nice set of classes for AsterNET that would do it :) I myself do some simple call modeling in my applications.

If you want to know what happened during the life-time of the call, you're best logging the events into a model, and then once the call ends (hangup etc) you can get the information from your model that you need.

No simple answer again, sorry :)