The mass collection of telephone data is necessary to monitor communications between terrorist suspects, the head of a US spy agency has said.