At that stage you should have told them that you wanted to terminate your contract and take your number with you (by getting a PAC code).
They probably would have given you the upgrade for free, failing which you could have shopped around for a better deal with a free phone, or got a better deal by starting afresh with O2.
There have been some amazing deals available over the last few years.
Yeah, very true. The only reason I didn't do this is because I'm not a great phone person when it comes to talking to strangers.