But the US president says he is open to talks with Tehran after pulling out of military strikes.