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 => myemail@gmail.com,,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 myemail@gmail.com, when a call to ext 1000 is not picked.