An article in one of our daily's had some advice about this, albeit another provider in another country, but bets are they work much the same, seems a reader had many problems cancelling a contract with a phone company who said they never received the cancelation notice, or any phone calls regarding, and the customer still owed many months rental, anyway, advice was to phone them up and get a cancelled contract number, send a recorded, tracked, signed for letter (Can this be done in Spain?) advising of the cancelation and putting in this letter that you have copies, and a witness, to the letter being sent, tell the bank to cancel all monies, sit back and wait.
Sounds all very drastic simply just to end a phone contract but I suppose better then all the problems that might be caused if done another way.