US President Donald Trump says the war with Iran is effectively over.