Premium rate lines were acquired and the cards used to make multiple calls, generating "substantial" bills for O2.
The men, from London, Essex and Birmingham, were sentenced to between 18 months and three years after earlier admitting conspiracy to defraud.
Bill-paying customers Mohammad Butt, 42, of Claremont Road, Forest Gate, east London, Abrar Arshad, 35, of Oastway, Rochford, Essex and Abiola Salami, 30, of Francis Road, Edgbaston, Birmingham, were jailed for three years each.
Ade James, 25, of Suffolk Street, Queensbury, Birmingham and Nikhil Jamsandekar, 33, of St George's Road, Forest Gate, east London, were sentenced to 18 months in prison.
Sentencing the men Judge Jeffrey Pegden QC said: "This is not a victimless crime, as inevitably such huge losses are passed on in part to honest bill-paying customers.
"This fraud was carried out by an international gang of conspirators.
"Simply stated, innocent, honest individuals' personal identities and details were dishonestly acquired along with countless mobile phone handsets and Sim cards which were dishonestly obtained."