Hi,
First of all I have to say the passing round for 1/2 hour while you're trying to cancel is shocking. However, I must point out a few things:
1. It is not the PAC code that has kept you on the 3 network. All the PAC code does is allow another provider to port your number across to their network. Your new provider uses this to inform your old provider that they wish to tx the number across, that is all a PAC code is used for.
2. If you explicitly stated that you wished to cancel, which I'm assuming you did as you managed to get a PAC code off of them, then they have no right to keep billing you. As long as you are outside your minimum contract term then they have no right to keep billing you as long as you have given them 30 days notice. However, you would still be charged for the 30 days notice, they are still providing you service during this period. As per your contract.
Make a complaint, if they get stroppy with you then submit a Subject Access Request to obtain a copy of the telephone call. This will cost £10, but then they have no argument if you can be heard stating you wished to cancel your contract.