Many thanks. unfortunately, as you say, all such agreements of this type contain standard terms and conditions which provide that at the end of the minimum period, the contract. To continue as a rolling month-to-month contract and can be ended on notice from you - usually subject to somewhere between 28 days and a month's notice. So if you wanted to end an agreement exactly at the end of the fixed term period for example, you could call or write to the company at least a month before the end of your contract and tell them you wished to end the contract or alternatively transfer your number to another company which has the effect of ending your contract on completion of the transfer.
If you did not do either of these things, regrettably, you are likely to be in difficulty unless you can demonstrate that a company representative advised you before you took the contract out that it would end automatically after two years. If you could do so, the position will be very different but unless you tell me differently, I will assume that no representative from the company advised you as such.
Your comments regarding the potential unfairness of the above position are apt in that Ofcom has, yesterday I believe, announced that all broadband and mobile providers must notify their customers prior to the end of the fixed term contract both that it is coming to an end and whether the customer can obtain a better deal. This ruling by Ofcom is intended to end the standard practice which you identify whereby companies undoubtedly hope that customers will simply forget about their contract for a while at least which enables them to continue charging the same or even higher fees for a period after the end of the fixed period. The difficulty is that the rules have not yet come into force and will not apply retrospectively so whilst they undoubtedly will help you and others in the future they do not and will not assist here.
In this case, unless you can demonstrate evidence that a company representative advised you that the contracts would end automatically at the end of the fixed period, very regrettably, I think you have little option but to consider paying O2 until the end of the notice period you gave O2 that you wished to end your contract. If you don't do so, O2 will very likely be able to enforce the terms of the contrac against you and can and likely will take unpleasant steps such as registering a default on your credit file and instructing debt collectors. if a default is registered on your credit file, this can cause you significant difficulties in obtaining credit a period of six years and would be best avoided at all costs.
it may be possible to negotiate with O2 for a new contract (assuming you were willing to consider one which you may understandable not in the circumstances) and ask them to waive some or all of the charges as part of the deal or discount any new deal to take account of the above circumstances but they would not be under obligation to do so and so it would depend how much they were willing to bend to keep your business.
I am sorry the above will be far from what you would wish to hear but I hope it is of assistance at least in enabling you to avoid potentially more damaging action they may take in terms of your credit file.
Does the above answer all your questions? If it does, I should be very grateful if you would kindly take a moment to rate my service by selecting the 5 stars at the top of the screen before you leave JA today. Your feedback is important to me. If there is anything else I can help with please reply back to me though