Staggered Group Notifications of new voicemail?

We have used the following scheme on our old phone system, and would like to duplicate with Asterisk/FreePBX

Customer calls in for after hours support and leaves message in voice mail box.
Voice Mail immediately notifies first on call technician. If she takes the call, no further action is taken. If she has not delet or save the voicemail within N minutes, the second on call technician is notified. After 2N minutes the third on call technician is called. After that we loop and continue to notifiy the technicians every N minutes until the call is handled.

Any elegant (or even servicable) way to get the same behavior?

TIA
Bob

you can write a script and custom dial plan to do this but I’ve not seen anything out of the box that can do it.

I would think that one way to do this would be to designate a particular extension’s voicemail box as the target for these calls - let’s say it’s the Extension 300 mailbox. Then you could write a bash, perl, etc. script that checks every minute to see if a voicemail file exists (look for files in /var/spool/asterisk/voicemail/default/300/INBOX) - if it finds one, it could generate a .call file (see http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out and perhaps also http://www.voip-info.org/wiki/view/Asterisk+tips+Wake-Up+Call+PHP for a working example, and you may also get some ideas at http://bestof.nerdvittles.com/applications/reminders4/ ) That .call file would bridge the called party to the voicemail pickup extension. The script should then wait to see if the voicemail directory empties out and if so, abort, but if not within a specified period of time then generate a .call file for the second tech, and so on. You could run this script once a minute as a cron job but you’d have to figure out how to keep more than one instance of the script from being invoked simultaneously.

Note this is probably not as easy as it sounds because voicemails can keep coming in while the first batch are being dealt with, but it probably wouldn’t be a major job for anyone conversant with .call files and one of the scripting languages to write a proper script - still, it’s not exactly trivial either (well, I know some guys would probably consider it trivial, but not me!).

The good part about it is that the creation and deletion of the voicemails can be done in the normal manner, and all your script has to do is generate the .call files at the proper time and at the correct intervals. When creating the call file, remember that direct access to a voicemail box is *+extension number (e.g. *300). Good luck!

The big issues with voicemail is that every time a message placed into the voicemail box it forces them to be in sequential order. So at 11:20 you get a call and if becomes Msg0000, at 11:21 it see’s a message and send a notice. Then at 11:22 the on call person calls in and gets that message and deletes it, but at the same time another call comes in and leaves a message that is not complete until after the on call person hangs up. So now there is again a msg0000 but this time it is a different message.

So you will need to track more then the message number but also it’s size/date time stamp.

Also consider that there are two messages in queue. The on call deals with the first one but not the second one. Do msg0000 get’s deleted but when that happens msg0001 get’s renamed to msg0000.

It’s not hard but you need to understand what happens behind the scenes with the files. Something to pay attention to there are the .wav and .WAV files (assuming standard setup here) but also a .txt file that has the specifics for the call and probably the best file to use as it contains all the caller id, time of call, etc info in it.