Doctors and health care professionals have called on the Federal Government to repeal legislation that stops them from speaking out about their work in detention centres.

Around 250 protesters gathered at Sydney's Town Hall to sign an open letter against the Border Force Act, which they said criminalises detention centre whistle blowers.

The new law threatens imprisonment for those who speak out against abuse of asylum seekers and about health care violations in onshore and offshore detention centres.

One of the doctors involved in the protest, general practitioner Michael Burke, said the legislation increased secrecy around what happened in detention facilities.

"I'm very concerned that there are events happening in refugee centres that aren't being reported," he said.

"I think the health professions have always worked to advocate and care for people and we have a worrying trend that that role has been diminished."

The Government said the laws protected national security and did not prevent medical staff from raising concerns internally.

Detention centre laws described as 'appalling'

At the rally, doctors vowed to speak out about human rights abuses in detention centres even with the threat of prosecution.

Doctor Harriett Gunn said there was evidence of "harmful care" on Nauru and any future abuses should not be kept secret.

"A lot of people we know who have gone there say the things that have been seen are so awful that as a doctor they have an obligation to [report the conditions]," she said.

"And in 10 years' time if they don't speak out there will be questions saying why did these people go with the legal laws that were put in place and why didn't they speak out."

Professor Maria Fiatarone Singh said under the current legislation there was no protection for doctors and other health workers if they spoke out about detention centre conditions.

"Really the onus should be on the side of the health professional to, even if there's any suspicion of something going wrong, just air [issues] and see if we could correct it," she said.

"This law has a very chilling opposite effect and it's just appalling. It's unheard of."