The neighbours have agreed to an immediate ceasefire after week of cross-border violence.