Thailand and Cambodia agreed to an immediate, unconditional ceasefire after five days of deadly border clashes.