The US president's comments come amid uncertainty over whether Iran will attend peace talks in Pakistan this week.