The US and Israeli leaders said they have agreed a peace plan for Gaza and warned Hamas to accept it.