The answer is to let Israel say it will recognize a Palestinian state along the 1967 borders, release the prisoners, and recognize the rights of the refugees to return to Palestine. Hamas will have a position if this occurs.
Interview with Washington Post. "We Do Not Wish to Throw Them Into the Sea". Washington Post. February 26, 2006