login | register
Tue 09 of Feb, 2010 [21:13 UTC]

voip-info.org

History

Asterisk Voicemail

Created by: rgauss,Last modification on Mon 04 of Jan, 2010 [15:53 UTC] by slaney

Asterisk Voicemail

Features

  • Password protected
  • Separate away and unavailable greetings
  • Default or custom greetings
  • Multiple mail folders
  • Web interface for checking of voicemail
  • E-mail notification of voicemail with audio file attachment
  • Voicemail forwarding
  • Visual message waiting indicator (MWI)
  • Message waiting stutter dialtone

The number of messages for each voicemailbox is limited to 99 messages. Starting with Asterisk 0.7.1 the system now plays a prompt warning the user that the mailbox is full and cannot record any more messages.

Enhanced voicemail

New features (as of April 28, 2004)
  • Option to have the CID of the caller heard before the voicemail
  • Option to allow an operator to be reached after leaving a voicemail
  • Option to review, rerecord, or save voicemails after leaving them
  • Option to review, rerecord, or save busy, unavailable, and name prompts.
  • Option to allow dialing out from within voicemail
  • Option to allow calling back of the person who left voicemail (with the correctly formatted contexts in extensions.conf)
  • Group voicemail (voicemail broadcast)

VoiceMail contexts.

The context defined in the voicemail.conf corresponds to entries in the channel configuration file, i.e. zapata.conf and sip.conf which require the context to be appended to the mailbox when using VoiceMail2.

Configuration lines for a voicemailbox in voicemail.conf:
[YourVoicemailContext]
210 => 5555,John Smith,jsmith@yourdomain.com

Line in zapata.conf or sip.conf:
mailbox=210@YourVoicemailContext

The location of saved messages also changes with the context:
 /var/spool/asterisk/voicemail/YourVoicemailContext/210/INBOX

VoiceMail includes a time stamp with the message by default.

When listening to a message you'll hear when it was recorded.


Please note

  • Voicemails are saved on the server in all formats specified in voicemail.conf, but only the first format specified is sent as an attachment to the email.
  • The /contrib/scripts directory of /usr/src/asterisk contains a Perl script that can be applied to regularly expire too old voicemail messages


Sending voicemail emails as MP3's


note: my <pathto> is /var/lib, some peoples will be /usr/share.
1. ensure "attachfmt=wav" and "format=wav|gsm"
2. Put the below script in: /<pathto>/asterisk/agi-bin/mp3vm.pl
3. chmod a+rx mp3vm.pl
4. modify mailcmd=perl /<pathto>/asterisk/agi-bin/mp3vm.pl
5. install lame if you don't already have it
6. check the path to perl, base64, dos2unix and lame and modify the script and mailcmd as needed.


#!/usr/bin/perl
open(VOICEMAIL,"|/usr/sbin/sendmail -t");
open(LAMEDEC,"|/usr/bin/dos2unix|/usr/bin/base64 -di|/usr/local/bin/lame --quiet --preset voice - /var/spool/asterisk/tmp/vmout.$$.mp3");
open(VM,">/var/spool/asterisk/tmp/vmout.debug.txt"); 
my $inaudio = 0;
loop: while(<>){
  if(/^\.$/){
    last loop;
  }
  if(/^Content-Type: audio\/x-wav/i){
    $inaudio = 1;
  }
  if($inaudio){
    while(s/^(Content-.*)wav(.*)$/$1mp3$2/gi){}
    if(/^\n$/){
      iloop: while(<>){
        print LAMEDEC $_;
        if(/^\n$/){
          last iloop;
        }
      }
      close(LAMEDEC);
      print VOICEMAIL "\n";
      print VM "\n";
      open(B64,"/usr/bin/base64 /var/spool/asterisk/tmp/vmout.$$.mp3|");
      while(<B64>){
        print VOICEMAIL $_; 
	print VM $_;	
      }
      close(B64);
      print VOICEMAIL "\n";
      print VM "\n";
      $inaudio = 0;
    }
  }
  print VOICEMAIL $_;
  print VM $_;
}
print VOICEMAIL "\.";
print VM "\.";
close(VOICEMAIL);
close(VM);

#CLEAN UP THE TEMP FILES CREATED
#This has to be done in a separate cron type job
#because unlinking at the end of this script is too fast,
#the message has not even gotten piped to send mail yet


attribution: minor modifications to script from user "analognipple" from trixbox.org

Dependencies


Old versions:

See Also




Comments

Comments Filter
222

333Unable to send voicemail to email

by paddy, Thursday 11 of June, 2009 [19:15:03 UTC]
I am not able to send voicemail to email. I faced trouble in configuring sendmail to send mails. Now I am using sendEmail perl script to send mails but i didn't find any success. does this require any code changes in app_voicemail.c. Can some one help in this.It will be helpful if someone post the code for sendEmail to work or the sendmail configuration.I am using asterisk 1.4.19 asterisk version. Please help

cheers,
paddy
222

333Low volume in VM files

by pozar, Saturday 14 of June, 2008 [22:47:33 UTC]
Seems that levels can go all over the place with voicemail messages. To some degree, some playing with incoming PSTN levels will help but then there is all the other sources you can get VM from such as other extensions, etc.<P>

It would be nice if * had some hooks for post processing the VM files before they get sent out as mail and dropped into the VM folders on *. Since there isn't, what I have been doing is running "normalize" on the VM folders so the files sound good if you are picking up the VM from your phone. It is a simple root cron job that looks like:
   0/5 * * * * /usr/bin/find /var/spool/asterisk/vm/ -type f -mmin -10 -name 'msg*wav' -exec /usr/local/bin/normalize {} \; > /dev/null 2>&1 &


In this, find will be run every 5 minutes and look for message wave files newer than 10 minutes. If it finds any it will run "normalize" on it.<P>

I have also told asterisk only create wav files in voicemail.conf:
    format=wav

You really don't need gsm or other formats. Asterisk does fine with just wav.<P>

BTW... Normalize can be found at:<P>

<UL>
   http://download.savannah.gnu.org/releases/normalize/
</UL>
Tim

222

333How do i use the review option

by brijrajsingh, Thursday 14 of February, 2008 [05:48:35 UTC]
Hi,
   I want to create a dialplan in which people can leave the voicemessages...it should be like

1. Answer
2. voicemail()
3. review your message / re record / just hangup hangup means confirm

now, i couldn't configure the 3rd option here...how do i use the review option of voicemail, with dialplan...

thanks,,,
222

333How do i use the review option

by brijrajsingh, Thursday 14 of February, 2008 [05:41:33 UTC]
Hi,
   I want to create a dialplan in which people can leave the voicemessages...it should be like

1. Answer
2. voicemail()
3. review your message / re record / just hangup hangup means confirm

now, i couldn't configure the 3rd option here...how do i use the review option of voicemail, with dialplan...

thanks,,,
222

333

by ucfmethod, Tuesday 08 of January, 2008 [23:59:00 UTC]
If you want to allow users with iPhones to listen to the voicemail attachment immediately, set the format to :

format=wav|wav49|gsm

Having wav as the first option means its the one emailed, and this option allows playback of the attachment on Apple's iPhone, so users can listen to their voicemail's as soon as they get them!
222

333Help!

by ch33ky_m0nk3y, Thursday 07 of June, 2007 [14:18:12 UTC]
Ok, i am right newbie to the asterisk environment, with no past experience of programming at all, but i have some friends that i can ask for help, but they cant help with everything.

I have a few phones set up on asterisk and i am playing around with the idea of having a text message sent or an email sent when a voicemail is received.

I have managed to send an email to an internal email on the network but as far as it goes for EXTERNAL... nothing, no emails what so ever.

I am completely STUCK!

Which is easier... voicemail to SMS or voicemail to email?

Any help would be much appreciated.

Thanks,

Simon
222

333Re: Voicemail calls cut off...

by mjgolli, Thursday 30 of November, 2006 [02:11:09 UTC]
I had the same problem, too. If you call vm and the first part of the announcement is cut off, add a wait(1) statement before the actual voicemail() or voicemailmain() calls. That should help. You'll be able to hear "Comedian Mail" rather than "median mail"!
222

333Re: Default greeting

by ksmithaz1, Wednesday 09 of August, 2006 [23:43:47 UTC]
<p>
It appears the designer of Comedian Mail was not more familiar with Meridian Mail than Audix. This is unfortunate because Meridan Mail was terrible, we used Calais on our Nortel stuff, Audix on the Lucent/ATT/Avaya/Whoever. By far the easiest mail system to use was Audix. Very intuative. I've considered re-engineering the VM system to be more audix like, but I'm not sure what direction all this stuff is headed, but Comedian Mail requires way too much navigation. I also miss *T (*8) transfer *D(*3) delete, etc. Lucent switches were annoying, but the voicemail was top notch.
</p>
<p>
Anyone else out there interested in a more Audix-like setup. I'm not sure I still have any training materials floading around, but I'm strongly interested in doing this.</p>
222

333Scheduling notification

by pwf1960, Thursday 15 of June, 2006 [09:38:39 UTC]
Is there any way to change the way notification works, based on the time of day? For example, you have a support group that has afterhours support from 1700 to 2200 hours
Monday through Friday. Is there a way to have a support mailbox that sends notifications only during that time frame?
222

333VoiceMail eXtreme for Asterisk Realtime configurations

by gjdeboer, Monday 22 of May, 2006 [17:21:19 UTC]
I have started a new project on http://voicemailx.sf.net which is an voicemail application for Asterisk Realtime configurations.