Carriers have varying policies, but most will keep undelivered text messages for a few days to a week. Voicemails are usually stored for a predefined period that can range from a few days to several weeks, depending on the carrier's policy.