The two countries decided to set aside offensive rhetoric and focus on intensifying bilateral relations through constructive talks.
Azerbaijan says it has agreed with Iran to resolve their diplomatic crisis over dialogue, weeks after ties soured over allegations that Israel's military was operating in Azerbaijan.
Foreign Minister of Azerbaijan Jeyhun Bayramov had spoken by phone with Iranian counterpart Hossein Amir-Abdollahian and the pair agreed to resolve differences through talks on Wednesday.
"The sides noted that recent rhetoric has harmed bilateral relations and that any differences should be settled through dialogue," Azerbaijan's Foreign Ministry announced in a statement on the same day.
The Iranian Foreign Ministry Amir-Abdollahian on the other hand had stressed that the two governments should "avoid misunderstandings and boost relations".
"Tehran and Baku have enemies and the two governments should not give them the opportunity to disrupt relations," the minister was quoted as saying in Tuesday evening's call.
The statement from Azerbaijan's Foreign Ministry said the two sides had agreed it was "necessary to establish a direct dialogue between government agencies of both countries on transit issues".
From offensive to constructive talks
Last month, Iran protested against what it said was the presence of its sworn enemy Israel in Azerbaijan and vowed to take any necessary action.
It staged military exercises near its border with Azerbaijan, sparking criticism from officials in Baku, which has denied Iranian claims.
Azerbaijan and Iran have long been at loggerheads over Tehran's backing of Armenia in the decades-long Karabakh conflict.
Last year's brief war ended with a Russian-brokered ceasefire that saw Yerevan cede swathes of contested territory, including a section of Azerbaijan's 700-km (430-mile) border with Iran that for decades had been under Armenian control.
Azerbaijan's decision to impose customs duties on Iranian truck drivers transiting to Armenia through that territory has also fuelled tensions.
Tehran has long been wary of separatist sentiment among its ethnic Azeri minority, who make up around 10 million of Iran's 83 million people.