Israel conditionally agrees to extend ceasefire