I’ve been using PhoneValet to handle the voicemail system here. It’s an OS X app and it works really good. I’ve run it on my desktop, but now that I have a spare OS X machine that I’ve turned into a bit of a server, I’ve put PhoneValet on there. With PhoneValet Anywhere, I still get notifications on my desktop as to who is calling so that I don’t have to lean over and look at the phone, which was one of the original reasons for purchasing it. However, with PhoneValet on the server, in another room, I have no way of telling if there’s a voicemail message unless I check my email which can be sporadic.

There’s no functionality in PhoneValet to allow for it to tell a remote *Anywhere client that a voicemail arrived, but it does have support to run AppleScripts after a voicemail has been left. So after an hour or so of fiddling around, I came up with a nice solution. It’s not the cleanest solution, but it works. It involves using AppleScript, a shell script, and the growlnotify commandline client. It’s a little convoluted, but works quite well enough. I did initially think to use ssh and ssh keys, but missed that growlnotify has support for listening to remote systems so opted to use that instead (although for receiving growl notifications from Linux boxes, using ssh/ssh keys would work very well).

If you’re in the same situation and up for the challenge, read on. On the system that you want to receive the notifcations, install Growl. Go into System Preferences -> Growl and hit the Network tab. Check off the “Listen for incoming notifications” and set a Server password.

On the system that PhoneValet is running on, make sure Growl, and the growlnotify commandline program (in the Extras folder) are installed and create a shellscript. I called this ~/bin/gnotify_voicemail with the following contents:

/usr/local/bin/growlnotify -n gnotify -I /Applications/iSync.app -H remote.host.com \
-P secret -s -m "$*"  Voicemail has arrived!

This needs to be edited to suit your system. The remote host (-H; remote.host.com in this case) is the host to connect to and you need to supply the password you used previously (in this case “secret”).

Now all you need to do is create the AppleScript. PhoneValet looks for the voicemail-related AppleScripts in /Library/Application Support/Parliant/AppleScripts/VoiceMail/ so I created “Growl Voicemail.scpt” there with the following contents:

--This script calls the gnotify shellscript which in turn calls growlnotify on the remote system(s) in order to indicate that a voicemail has arrived

on process_voicemail_message(callerName, callerNumber, soundFilePath, callTime, lineName, domesticAreaCode, domesticNumber, mailboxName)

    set call_date to date callTime
    -- format the caller name
    if (callerName = "") then
        set cname to "Unknown"
        set cname to callerName
    end if

    do shell script "/Users/vdanen/bin/gnotify_voicemail Voicemail from " & cname & " at " & callTime

end process_voicemail_message

Of course, change the location of the shellscript to match.

Finally, fire up PhoneValet, go into Preferences -> AppleScripts, hit the “Voice Mail” tab and check off the “Growl Voicemail.scpt” script, save and exit.

You could also test the shellscript real quick by executing:

$ ~/bin/gnotify_voicemail "This is a test message"

Make sure the script is executable, of course. When you execute that, you should see a growl popup on your system.

Now whenever you receive a voicemail you should get a popup on your workstation (or the computer that PhoneValet is not running on). You might want to modify the Growl preferences for this so that the popups are sticky, so to do that go into the Growl preference pane, go into the Applications tab, scroll down and look for “gnotify” and make sure it’s enabled. Change the Display to “Brushed” or something similar and make sure Sticky is enabled. Now even if the voice mail was left a minute ago or 10 hours ago, the growl notification will remain on your screen for you to see when you get back to it.

Of course, this also assumes your workstation is on 24/7 to receive the Growl notifications. If it’s not on, I’m pretty sure you won’t get the notification.

Sorry, quick and hurried write-up (it’s late and I want to go to bed), but hopefully that’ll give you enough to get going.

Share on: TwitterLinkedIn




Stay in touch