Obama's comment in an interview with Spanish-language TV network Telemundo was the latest indication the president would like to jump from the crisis over Syria's chemical weapons to a new search for a diplomatic deal with Iran over its nuclear energy program.
Last weekend, Obama revealed he and Rouhani had exchanged letters about the US-Iran standoff. Both leaders will be at the UN General Assembly in New York next week, although White House officials say they are no current plans for them to meet.
"There is an opportunity here for diplomacy," Obama told Telemundo. "And I hope the Iranians take advantage of it."
Obama ran for president in 2008 in part by vowing to open a dialogue with Iran.
But there has been no breakthrough and sanctions by Washington and the United Nations in a bid to weaken Iran's economy have gradually been increased to try to pressure Tehran to give up its nuclear program.
Tehran has repeatedly said it wants the program for peaceful purposes including production of atomic energy. The International Atomic Energy Agency (IAEA) has so far verified non-diversion in Iran’s peaceful nuclear program.
"There are indications that Rouhani, the new president, is somebody who is looking to open dialogue with the West and with the United States, in a way that we haven't seen in the past. And so we should test it," Obama said.
Since the election in June of Rouhani, officials from both countries have made increasing hints that they are open to direct talks to seek an end to the decade-long nuclear dispute.
NTJ/BA