Prime Minister Tony Abbott says he has written back to Indonesian president Susilo Bambang Yudhoyono as he tries to smooth diplomatic tensions between the two countries brought on by spying allegations.

Indonesian has demanded Australia explains why its spies tapped Mr Yudhoyono's phone and those of his inner circle, including his wife's, in 2009.

On Thursday, Mr Abbott told Parliament he had received a letter from the Indonesian president.

His admission came a day after Indonesia suspended military and intelligence cooperation with Australia, with an angry Mr Yudhoyono announcing he would write to Mr Abbott demanding an official explanation of why Australian spies tapped his phone.

Mr Abbott says he has replied to Mr Yudhoyono's letter, but did not reveal the details of his correspondence.

He said one of his priorities as prime minister was to maintain a strong relationship with Indonesia.

"There'll be good days and there'll be better days. But my determination is to ensure that the relationship is constantly improving and my gratitude is always to president Yudhoyono, who has been a very good friend to Australia - one of the best friends we've ever had," Mr Abbott said.

Criticism from home and abroad over response

Earlier, former Labor prime minister Julia Gillard told CNN Mr Abbott should promise not to tap the Mr Yudhoyono's phone in the future.

In a wide-ranging interview, Ms Gillard was asked for her reaction to the diplomatic row over alleged phone tapping that took place in 2009 - before she replaced Kevin Rudd as prime minister.

Ms Gillard says it is not appropriate for her to comment on intelligence questions, but she endorsed the way United States president Barack Obama handled similar allegations that the US was spying on the German chancellor Angela Merkel.

"If he [Mr Obama] had been aware he wouldn't have authorised it, and he could certainly say for the future that it wouldn't happen again," she said.

"And I think that that's an appropriate response from Australia to Indonesia at this very difficult time."

A powerful Indonesian opposition figure and the country's former intelligence chief has also weighed in on the issue.

Tebagus Hasannudin, the deputy chairman of Indonesia's foreign affairs commission - and a senior member of the opposition party that looks most likely to win next year's presidential election - says Mr Abbott's response thus far has been "lacking in diplomacy skills".

Major General Hasannudin, a military secretary for three presidents, praised Indonesia's handling of the issue despite being a member of a nationalist party that opposes Mr Yudhoyono.

"I have high respect and appreciation for Susilo Bambang Yudhyono's recent action," said Major General Hasannudin, who will likely be a key figure Australia will have to deal with in near future.

"Because when a response was given by Prime Minister Abbott, it was not in accordance to the standards expected by Indonesians.

"Other type of responses, better ones, could have been made, better for both Australia's internal politics and foreign affairs interests, to show that it's a friendly and neighbourly country - that is my opinion."