Israel and Lebanon have agreed to a three-week extension of their ceasefire in a deal inked at the White House.