If it works without a problem in the test socket, but disconnects if you plug it elsewwhere, then there is an issue with your internal wiring.
Do you have any other phone sockets or extension wiring?
Leave it in the test socket for now, and see if it stays connected.
It just did it again. So I don't know what to do. No we have just that one.
Recheck the phone line for noise now. Dial 17070 (free call) and select option 2, quiet line test, and see if there is any noise on the line.
It could be a faulty home hub, or a very random noise burst on the line.
Its worth doing the following things first, as the home hub configuration can get corrupted.
factory reset the home hub.
Then turn Smart Setup off.
Then separate and rename the SSIDs.