The iPhone stores voicemail audio in the Adaptive Multi-Rate format (.amr) Unfortunately, neither QuickTime nor iTunes will allow you to export the proper AMR file for this purpose. Instead, you need to use a special software to convert .mp3 or other audio formats to .amr (Google it), there are lots of them for shareware for free, you just need it for one day, that will be good for you to make the conversion. On the software to convert your audio file to .amr When you're asked about a bitrate, use 12.2 kbps and leave the other option unchanged. If everything works, you'll have yourself an amr audio file.
Now here's the tricky part. In order to use the custom message, you need to trick the iPhone into uploading it to the AT&T server.
On the iPhone, go into voicemail and tap "Greeting". Record a few seconds of something and tap stop. Before you tap save, use iPhone browser or WinSCP to navigate to /user/Library/Voicemail on your iPhone. You'll see a file called "Greeting. amr". This is the audio you just recorded. Delete that file and replace it with your custom message file which should then be renamed to "Greeting.amr". Tap "Play" on the iPhone to verify your message works. If it plays, tap "Save" and your custom message will be uploaded to AT&T's servers.
Now that, my friends, is awesome. Thanks to iPhone Alley reader Craig K. for this tip!