President Barack Obama said that he spoke on the phone Friday with Iranian President Hasan Rouhani, the first such communication between U.S. and Iranian presidents since the 1979 Iranian revolution.

Obama spoke at the White House in a news-heavy press conference, where he delivered a statement on foreign policy and budget battles in Congress.

Obama said that though the conversation "underscores the deep mistrust between our countries," he was persuaded that there was a path forward on a resolution to Iran's nuclear program.

"While there will surely be important obstacles moving forward, I believe that we can reach a comprehensive solution," Obama said.

Obama's statement came after a speech at the United Nations earlier this week, in which he outlined a pursuit of diplomacy with respect to Iran and its nuclear energy program. Rouhani has spent the past few months making conciliatory statements on its nuclear program, due to economic sanctions that have crippled Iran's economy.

After his announcement, Obama quickly pivoted to the budget battles engulfing Congress. The two chambers are battling in debates over keeping the government funded past Sept. 30 and raising the debt ceiling by Oct. 17.

"My message to Congress is this: Do not shut down the government. Don’t shut down the economy. Pass a budget on time. Pay our bills on time," Obama said.

The Senate on Friday passed its version of a bill to keep the government funded and avert a government shutdown, the latest move in legislative ping-pong between the two chambers of Congress.

The Senate's continuing resolution funds the government through Nov. 15, and it strips language in a House of Representatives "CR" to defund the Affordable Care Act. The final version passed in a 54-44 vote. Obama praised the Senate for "act[ing] responsibily."

Now it goes back to the House, where it could face additional changes. If the two chambers can't agree on a compromise before Oct. 1, the government will partially shut down.

Obama and the White House have spent much of the past few weeks warning against "self-inflicted wounds" that budget battles could have on the economy. Obama has said he won't sign any bill that defunds Obamacare. On Thursday, White House senior adviser Dan Pfeiffer went so far as to compare House Republicans to suicide bombers, arsonists, and kidnappers taking a hostage.

On raising the debt ceiling, Obama took much of the same tone. He suggested that Republican demands on raising the debt ceiling were ridiculous, and he said he would not set the precedent of negotiating with the "full faith and credit" of the United States on the line.

"Voting to pay America's bills is not a concession to me. That's not doing me a favor," he said.

"Imagine if you had a Republican president and a Democratic speaker, and the Democratic speaker said, 'Well, we’re not going to pass the debt ceiling unless we raise corporate taxes by 40 percent or unless we pass background checks on guns,' or whatever other list of agenda items Democrats were interested in.

"Does anybody actually think that we would be hearing from Republicans that that was acceptable behavior? That’s not how our constitutional system is designed. We are not going to do it."

In response, Brendan Buck, a spokesman for House Speaker John Boehner, blasted Obama's "grandstanding."

"The House will take action that reflects the fundamental fact that Americans don’t want a government shutdown and they don’t want the train wreck that is Obamacare," Buck said. "Grandstanding from the president, who refuses to even be a part of the process, won’t bring Congress any closer to a resolution."

A Boehner aide said that Obama has not called Boehner all week.