US President Donald Trump and Iranian President Masoud Pezeshkian signed an initial agreement aimed at bringing the Iran war to a close on Wednesday.