The phones, no bigger than a cigarette-lighter, were being used to mastermind crimes from inside jail.