Palestinian factions have agreed to extend an open-ended truce with Israel in exchange for a halt to Israeli attacks and the release of prisoners .