Asterisk Voice Mail Setup

I am an Asterisk newbie trying to deploy a VoIP setup in my LAN. While I have managed to configure most of the settings, voicemail is still giving me problems. My test setup has two extensions 7010 and 7020 defined. When I try to leave a voice message for an extension, say 7020, Asterisk records the message and sends it to the email account corresponding to the extension. The attachment with the email contains the recording. Till this, it works fine. However, when I try to fetch the same voice message through VoiceMailMain, the following happens: The IVR claims that there is one unread message. When I press the options to fetch this message, nothing plays. The following error pops up on the CLI:
WARNING[8503296]: File format_wav_gsm.c, Line 128 (check_header): Unexpected header size 16
WARNING[8503296]: File file.c, Line 379 (ast_filehelper): Unable to open fd on /var/spool/asterisk/vm/7020/Old/msg0000
WARNING[8503296]: File file.c, Line 725 (ast_streamfile): Unable to open /var/spool/asterisk/vm/7020/Old/msg0000 (format GSM): No such file or directory
WARNING[8503296]: File app_voicemail.c, Line 2082 (vm_execmain): Unable to play message /var/spool/asterisk/vm/7020/Old/msg0000

And, when I try to look into the folder, the message is there. When I try to move the message into different folders, the IVR moves them fine. However, it cannot playback any message.

The second issue:

I tried to setup voicemail so that when somebody dials *7010, they should automatically get into the mailbox of account 7010 and they should be asked for the password. However, with my current extensions.conf, it does not happen. When I dial *7010, I am asked for both the mailbox number and password. When I enter them both, I am successfully authenticated. Here are excerpts from my extensions.conf:

; Template used for all extensions
exten => 7010,1,NoOp(Incoming call for VJ at ext. 7010)
exten => 7010,2,Dial(IAX2/7010&SIP/7010,30,tr)
exten => 7010,3,Voicemail(u${EXTEN})
exten => 7010,4,Hangup
exten => 7010,102, Voicemail(b${EXTEN})
exten => 7010,103, Hangup

; For accessing VoiceMail
exten => _*7X.,1,NoOp({EXTEN:1)
exten => _*7X.,2,VoiceMailMain,{EXTEN:1}
exten => _*7X.,3,Hangup

Excerpts from sip.conf

[7010]
type=friend
secret=010
auth=md5
host=dynamic
nat=yes
reinvite=no
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
context=autocontext
mailbox=7010
callerid=“V J”<7010>

I am running Asterisk on a XServe G5 running Mac OSX Panther Server.

Thanks in advance,

J

Hi,

About your first problem, I think it’s relate to the format you save your voicemail, in voicemail.conf you have a line : format=
Personnaly I change the default to : format=wav|gsm|wav49 because I don’t want compress file to email, people complains about bad quality. Anyway I never get problem with those format.

For your second concern, what you need to do it’s change your line:
exten => _*7X.,2,VoiceMailMain,{EXTEN:1}
in your extension.conf for :
exten => _*7X.,2,VoiceMailMain(${EXTEN:1})

That should work.

Bye !

Thanks for the response.

The solution to the second issue worked perfectly. Did not know how I missed the Dollar sign !!!

However, when I made those suggested modifications to voicemail.conf, the same issue persists. But I get a different set of messages now…

WARNING[8483328]: File format_wav_gsm.c, Line 176 (check_header): Does not say fact
WARNING[8483328]: File file.c, Line 379 (ast_filehelper): Unable to open fd on /var/spool/asterisk/vm/7020/INBOX/msg0000
WARNING[8483328]: File file.c, Line 725 (ast_streamfile): Unable to open /var/spool/asterisk/vm/7020/INBOX/msg0000 (format GSM): No such file or directory
WARNING[8483328]: File app_voicemail.c, Line 2082 (vm_execmain): Unable to play message /var/spool/asterisk/vm/7020/INBOX/msg0000

Looking forward to hearing from you.

-J

Well, I really don’t know.
I never got any problems like that with voicemail. Just for curiosity and to help others who can may be help you, what version of Asterisk are you running ?

And maybe a post of your voicemail.conf could help also.

Ciao !

Version:

Asterisk CVS-10/28/03-07:16:52 built by root@BK-PowerBook.local. on a Power Macintosh running Darwin

(This was actually a pre-built version for OSX by Sunrise Tel…)

Voicemaill.conf

[general]
format=wav|gsm|wav49
serveremail=voicemail@**.com
attach=yes
maxmessage=180
maxgreet=60
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
fromstring=The Asterisk PBX
emailbody=Dear ${VM_NAME}:\n\n\t You were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE} so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t-- Automated VoiceMail\n

[zonemessages]
eastern=America/New_York|‘vm-received’ Q ‘digits/at’ IMp
central=America/Chicago|‘vm-received’ Q ‘digits/at’ IMp
central24=America/Chicago|‘vm-received’ q ‘digits/at’ H ‘digits/hundred’ M ‘hours’

[default]
1234 => 4242,Example Mailbox,root@localhost
7010 => 010, V J, vj@m***.com
7020 => 020, Test User, testuser@m***.com

Solved it as follows.
Removed the entire asterisk installation
Downloaded the latest sources
Compiled and Installed.
Now working beautifully… The precompiled version for OSX is almost two years old !!!

Thanks a ton for your input.

-J