President Trump has signalled that he could call off military action against Iran, adding impetus to diplomatic efforts to avoid a full escalation.