There are now a number of options for unlocking the iPhone:
(1) if you are on 3.0 then you can use Redsn0w and Ultrasn0w:
http://www.iclarified.com/entry/index.php?enid=4301
http://www.iclarified.com/entry/index.php?enid=4253
(2) If you are on the latest software 3.1.2 then you can use Blackra1n and BlackSn0w:
http://www.iclarified.com/entry/index.php?enid=5886
(3) Finally, if you are nearing the end of your O2 contract like me you can apply for a legitimate unlock from O2:
http://shop.o2.co.uk/update/unlockmyiphone.html
And here is the proof it works: