O'Reilly logo

VoIP Hacks by Theodore Wallingford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #97. Automate Your Voicemail Greeting

Use an AGI script with Asterisk to update your voicemail greeting automatically.

In the business world, people often update their voicemail greeting on a daily basis. For example, you might call a co-worker and be greeted with "You've reached the desk of Bob Smith. Today is Tuesday, August 16, and I am in the office today." You can imagine Bob's routine when he gets into the office in the morning: he verifies the current date, rehearses his new message a couple of times, and then calls into his voicemail and updates it. He probably stumbles over the words a couple of times, so he probably has to start over at least once.

This takes far more effort and time than I am willing to commit just to update the current date in my voicemail greeting. I've got more fun things to work on than that! Here's how you can use an AGI script with Asterisk and some home automation to keep your voicemail greeting up to date automatically, without lifting a finger.

Create the Sound Files

You can always use Asterisk's built-in text-to-speech engine to speak your message for you, but that is a little too cold. Instead, with a little work, you can have Asterisk play the appropriate sound files that you've recorded with your own voice. I used the sound recorder that comes with Windows to record several sounds: one for each day of the week (wday1.wav for Monday, wday2.wav for Tuesday, etc.); one for each month of the year (month1.wav for January, month2.wav for February, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required