VoiceMail is used to leave a message if someone is not answering your call. The configuration in Asterisk is done in /etc/asterisk/voicemail.conf. In order to configure voicemail, add following line:
1000 => firstname.lastname@example.org,,attach=no|saycid=no|envelope=no|delete=no
This will configure a voicemail system to email the received voice message (with attach file option) to email@example.com, when a call to ext 1000 is not picked.