Factions in the besieged Gaza Strip say they have agreed to an Egyptian-brokered ceasefire to end flare-up of violence.