hi there,

i am leaving a voicemail to one of the extension , it is disocnnect after 10 sec and seeing the message in cli prompt.

it will be ver much helpfull, if anyone can help me to fix…

Executing VoiceMail(“SIP/218-0e88”, “294@voicemail”) in new stack
– Playing ‘vm-intro’ (language ‘en’)
May 1 09:59:51 WARNING[8351]: app.c:1164 ast_lock_path: Failed to lock path ‘/var/spool/asterisk/voicemail/voicemail/294/INBOX’: File exists
May 1 09:59:51 ERROR[8351]: app_voicemail.c:5569 vm_exec: Could not leave voicemail. The path is already locked.
– Executing Playback(“SIP/218-0e88”, “vm-goodbye”) in new stack
– Playing ‘vm-goodbye’ (language ‘en’)
– Executing Hangup(“SIP/218-0e88”, “”) in new stack


looks like there is a file lock on the INBOX directory…i would try one of two things:

  1. restart asterisk. hopefully the file lock will be cleared, unless a process other than asterisk is accessing that dir/file.

  2. restart the server.

past that, i would think you’d have to manually clear the lock, something I don’t know how to do…if it were me, i’d probably delete the directory and let asterisk recreate it. i’m sure there is a better way, maybe someone else will post it.

also rightnow, i can not restart the server it is in production, much helpfull ,if we have some provision to kill the same… … and will be great.

well, lets start with the obvious…do a ‘ls -lah’ of the ‘/var/spool/asterisk/voicemail/voicemail/294/INBOX’ directory, we’ll see what’s in there.

hi it says the follwoing

drwx------ 2 root root 4.0K May 1 12:11 .
drwx------ 3 root root 4.0K Apr 1 09:54 …
-rw-r–r-- 1 root apache 0 Apr 28 17:07 .lock
-rw------- 1 root root 0 Apr 30 12:50 .lock-03a001c9
-rw------- 1 root root 0 Apr 30 12:55 .lock-0ee0ea3e
-rw------- 1 root root 0 May 1 12:11 .lock-18af70bd
-rw------- 1 root root 0 May 1 09:59 .lock-2cdce7d9
-rw------- 1 root root 0 Apr 30 12:54 .lock-31f1b223
-rw------- 1 root root 0 May 1 11:31 .lock-3a50ac4c
-rw------- 1 root root 0 Apr 30 12:50 .lock-536d0176
-rw------- 1 root root 0 Apr 30 13:05 .lock-717ee829
-rwx------ 1 root root 3.1K Apr 19 12:12 msg0000.gsm
-rw-r–r-- 1 root root 232 Apr 19 12:12 msg0000.txt
-rwx------ 1 root root 30K Apr 19 12:12 msg0000.wav
-rwx------ 1 root root 3.1K Apr 19 12:12 msg0000.WAV

OK, not sure if this is going to work but try copying msg0000.* to a different directory, then delete everything in that directory. It looks like something screwy is going on, but i’m not sure what.

do you use any sort of web frontend for the voicemail system? the .lock file that is owned by root/apache might be part of the problem - it looks like apache was trying to lock that directory down - i’m wondering if that is from the vmail.cgi script.

if you can just delete all that stuff, let’s try that first…back up the msg0000 files first, if the user needs that VM.


i use webvoice mail … it uses apache rite. i have deleted the same. still i am not able to record a message more than 10 sec.

Any help would be appreciated.

20 minutes goes by and you’re already posting again?

completely remove the 294 directory, stop apache (disable the web voicemail functionality, in other words), and try leaving a new message. make sure that all traces of that particular inbox are gone.

what kind of server is this, and what operating system are you running? what version of asterisk? are you using the built-in vmail.cgi script for web voicemail or some third party solution?

i use asterisk and i use the built in vmail.cgi script.

The same thing , all our people (extensions users) also not able to leave the voicemail more than 10 after it disconencts suddenly. and show user hung up inthe cli prompt.

Also how do i find the traces of the mail box are gone?


if EVERYONE is affected by this, i’d say it’s probably a permissions issue of some sort.

if you go to the /var/spool/asterisk/voicemail directory, there should be another directory below that, named for the context that your mailboxes are set up in. in your case, it looks to be voicemail. in THAT directory, there should be individual boxes for each user. what i would do is create a new ‘test’ user and attempt to leave a VM in that mailbox…if it works, we can look at what the differences are between directories and see if we can isolate the issue that way.

also, check your hard drive usage - although you’d be having many more problems if your hard drive was full. run ‘df’ on the command line and post the results…

i’m running out of ideas, anyone else got some?


This is my usage after running the df

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda8 2063504 476920 1481764 25% /
/dev/sda3 194449 21981 162428 12% /boot
none 1541116 0 1541116 0% /dev/shm
/dev/sda7 1035660 32844 950208 4% /tmp
/dev/sda5 10072456 3031184 6529604 32% /usr
/dev/sda9 10072456 200016 9360772 3% /var
/dev/sda2 3352268 32884 3149096 2% /home

you have plenty of disk space…

try creating a new mailbox and leaving a message in it, just for grins.

The problem still exists and now i am not able receive the email notification of voicemails.

when is the last time this server was rebooted? what OS are you running?

i understand this is a production server, but you might need to schedule downtime, or get up at 3am to bounce it…i’m reaching the end of my knowledge, and rather than waste 4 hours reading up on this, the best course of action might be to just reboot the damn thing. at least we know we’re working with a clean slate.

it is booted before 2 days and it is runninng on RHEL3.


I rebooted the machine and still it is not able to send email notification of voicemail as i am not able to record the voicemail for more than 10 sec… after i get the following error.

May 3 01:51:42 WARNING[4554]: file.c:584 ast_readaudio_callback: Failed to write frame

-rw------- 1 root root 0 Apr 30 12:50 .lock-03a001c9
-rw------- 1 root root 0 Apr 30 12:55 .lock-0ee0ea3e
-rw------- 1 root root 0 May 1 12:11 .lock-18af70bd
-rw------- 1 root root 0 May 1 09:59 .lock-2cdce7d9
-rw------- 1 root root 0 Apr 30 12:54 .lock-31f1b223
-rw------- 1 root root 0 May 1 11:31 .lock-3a50ac4c
-rw------- 1 root root 0 Apr 30 12:50 .lock-536d0176
-rw------- 1 root root 0 Apr 30 13:05 .lock-717ee829

As you can see, these files are assigned to the user/group
"root" “root” where only the USER “root” is able to delete, not so the group apache or asterisk is in.

Thats why all these lockfiles are not cleared and asterisk cant work properly on these files anymore.

You need to fix your linux user rights and assign the correspondending rights to the group/users.

May 3 01:51:42 WARNING[4554]: file.c:584 ast_readaudio_callback: Failed to write frame[/quote]

This is a (not unusual) “WARNING” and not an “ERROR”, the application will still continue.


What do i do next ?

do i need to change any user privillages , if so please let me know and i will do it and check …


sometimes i used to get thid type of error also [quote]channel.c:787 channel_find_locked: Avoided initial deadlock for ‘0xb7132658’, 10 retries[/quote]!