First of all, this concerns NOT the widely known 'international access numbers' starting 07755, 07744 etc, these have been on 25p/min for a long time now after O2 took them out of the inclusive minutes.
We are talking about regular landline numbers (020, 0161, 0121, etc) that forward to VoIP systems. These numbers are increasingly being used by companies and home users alike as business or even home landline numbers, and so O2 have NO right to block any of these numbers.
O2 had better not be doing the blocking you describe above as they can land themselves into trouble (as you said, breach of contract), and above all, there is no possible way they can control or enfoce such a ridiculous thing.
I use a local Manchester number to phone my wife abroad, this number obviously forwards via VoIP to her wherever she is. If O2 would be so silly as to block this number, I would simply get a new number to forward to my wife's location. These numbers are local and only cost around £2 per month, and are as easy to change as socks. Therefore, O2's little whim is completely unenforceable.
Oh, and I've been using this number from my mobile for a couple of years now, no word from O2 (not that I expected to hear anything from them anyway).
Besides, going back to the breach of contract, they have no way of proving that a certain phone number forwards to a VoIP service, and even if it does, they have no way of proving it forwards abroad. For example, my own home landline number is in fact VoIP, so I could be calling my home all the time for all they know, in which case they would have blocked my home number and land themselves into the trouble mentioned above.
Even if they try to block whole ranges of numbers (again, silly thing to do as most of them will be real home numbers), there are sooooooo many VoIP companies offering such numbers that they will be forced to block a substantial percentage of all landline numbers in use today.
There is absolutely nothing wrong, illegal, immoral or even 'underground' about using this kind of VoIP services to phone internationally at affordable rates. If there is anything immoral and wrong that would be any person or telecom network who try, by any means, to restrict customers' access to these freely available services in order for said customers to use the telecom networks own, highly-priced services instead. Apart from immoral and wrong, this could also get to be illegal if such practices result in breach of contract and like legal mishaps.
Come to think of it, perhaps it'd be good if O2 blocked my wife's local number... Then I could take legal action, get out of my contract and keep my N95 for free