Pakistan and Qatar have dispatched teams to Tehran under the looming threat of resumed war, after weeks of diplomacy failed to produce an agreement.