A Sydney man has been jailed for nine months for threatening to slit the throat of a Commonwealth official.

Milad Bin Ahmad-Shah Al Ahmadzai, 24, threatened to slit the officer's throat and called him a pig during prank phone calls in 2013, Sydney's District Court heard.

In one call, he threatened to crack the officer's neck and in another said his name was Ronald McDonald.

Al Ahmadzai appeared in court via video-link with his hands over his mouth and, at times, smiling.

Sentencing him to nine months jail, Judge Ian McClintock said he had shown remorse and entered an early guilty plea to charges of using a carriage service to make a threat and threatening to harm a public official.

The judge discounted his sentence by 25 per cent because of his early guilty plea.

With time already served he will be eligible for parole in November.

"I accept the offender is remorseful," Judge McClintock said.

He said the phone call was menacing, but the offender was immature.

The maximum penalty he could have received was 10 years.

Al Ahmadzai was arrested in his Western Sydney home by the Joint Counter Terrorism Team which works with ASIO.

Police said he had been under surveillance since 2009 for alleged terrorism offences.