I did this, I was told I had 3 months left on my contract by the guy in phones 4 u. He called up t-mobile to find out. so he then changed my old tariff to the lowest available to £15 a month from £35 and gave me the cash from the till (£50) to pay off my contract. All seemed good but then I found out I actually had 6 months on my contract left so the guy in the shop had lied to me.. I should have known myself to be honest how much I had left to go on my contract so maybe I was partly to blame, but anyway, I contacted phones4u via email through their website and they sent me a cheque to cover the rest of my old contract.
I called t-mobile up.. explained that I wanted to end my contract and wanted to keep my number. (ive had the same number for years, so that was important to me) I paid them the line rental to the end of my contract with the money phones4u gave me and they released my number so that I could transfer it to my new orange contract.
In the end it all worked out well and was easy. the only glitch was phones4u only telling me I had 3 months left when I actually had 6!