You don't say what network you are on or where you are going. However I'll try and take a general stab at a reply from the UK outbound from the O2 website.
How do I use Visual Voicemail abroad?
In most countries Visual Voicemail will work as it does in the UK. Where it doesn't work you can access your voicemail from another device by dialing your mobile number, pressing * during your greeting and following the prompts.
After youve upgraded to iPhone OS 3.0 software, your Visual Voicemail might work differently overseas.
If Data Roaming (in Settings > General > Network) is switched off on your iPhone, Visual Voicemail it wont work at all. Instead, to get your voicemail overseas, you can:
Call 901 (there might be a charge)
Switch on Data Roaming (in (in Settings > General > Network) while you look at Visual Voicemail, then turn it off again. We dont recommend this, though, because some of your iPhone apps might automatically send or receive data and youll be charged. Its £2.94 a MB in the EU and £6 a MB everywhere else, so its a bit risky if you dont want an unexpected big bill when you get back.