Story highlights An X-ray reveals a cell phone and two hands-free sets hidden in a prisoner's rectum

Sri Lanka's prisons chief says the smuggling of phones into jails is a big problem

Prisoners talk at nighttime using hands-free sets under the covers to avoid detection

They often acquire the cell phones when they leave the prison to attend court

When 58-year-old G. Siripala, a Sri Lankan prisoner serving a 10-year sentence for theft, was escorted by armed prison officials to Colombo's National Hospital with severe back pain, doctors rushed him for an X-ray.

Doctors thought he might have orthopaedic complications, a source familiar with the matter told CNN. "But the X-ray showed a cell phone and two hands-free kits."

Medical staff prepared to carry out a surgical procedure on the prisoner, the source said.

"However, the man said 'Sir, sir, please give me a moment.' He coughed, wriggled, shrugged his muscles and the items fell on the ground," the source said.

The awkward incident reveals how Sri Lanka's prison officials discovered the latest round of phone smuggling into the high security Welikade Prison, in the northern sector of the capital, Colombo.

The prisoner explained his situation to the doctors, recounting how had been chatting on the cell phone with a relative when prison officials carried out a surprise check on his ward, the source said.

"He had no place to hide it. So he thrust it in his rectum together with the two hands-free kits," he said of the prisoner.

At nighttime, to avoid detection, the prisoners cover themselves with a bed sheet, hide the phone near the body and use the hands free kit, the source added.

Siripala's undoing came when the person he had been speaking to rang back. The ringing tone came from his back and prison officials grabbed him, the source said.

The prisoner alleges he was beaten by prison guards, causing the back pain that resulted in his trip to hospital and subsequent X-ray.

Prison officials contacted by CNN declined to comment on the matter because there was no such complaint of abuses.

Siripala was kept under observation for a day at the National Hospital and discharged on Friday, the source familiar with the matter said. A prison guard stood by his side at all times until he was escorted out in a prison van.

Smuggling of cell phones into prison is an all-too-common occurrence, forcing prison officers to use hand-held detectors, Commissioner General of Prisons P.W. Kodippili told CNN.

"Most prisoners, particularly when they are taken to courts for cases, return with mobile phones given by outside parties. We have minimized the problem and are on the alert and catch them when they come in," said Kodippili, who is in charge of all of Sri Lanka's prisons.

According to Kodippili, the "worst offenders" are female prisoners.

He told how one, a drug addict, had hidden two mobile phones in her person after a trip to court. "She had gone to the toilet and sought the help of another prisoner to use a thin piece of iron to pull it out. She was wounded and bleeding. We had to rush her to the prison's hospital."

Kodippili said jammers have been installed in prisons. However, one mobile phone operator had a tower near Welikade Prison and this was causing a technical glitch.

"Very soon we will introduce body and parcel scanners," he added.