"The United Nations would welcome and be prepared to facilitate a dialogue between a strong and representative delegation from the opposition and a
credible and empowered delegation from the Syrian government," a joint statement from Ban and his top envoy for the conflict Lakhdar Brahimi said.
It said such a dialogue "can take place according to an agreed agenda".
Ban and Brahimi met in Switzerland and discussed "recent statements by the Syrian government and the opposition indicating their willingness to engage in dialogue," the UN said.
"Both expressed deep frustration at the failure of the international community to act with unity to end to the conflict which has left over 70,000 dead and resulted in a massive human displacement within and outside of the Syrian borders."
Ban and Brahimi also warned that both Syrian President Bashar al-Assad's regime and opposition fighters "have become increasingly reckless with human life" as the two-year-old conflict rages on.
They said perpetrators of war crimes and crimes against humanity must be brought to justice.
Ban, who was in Switzerland for an annual meeting with the heads of 30 UN peacekeeping and political missions worldwide, warned Friday that the conflict was breaking Syria apart.
There is a "very small window of opportunity" for peace that may soon close, he said.