remove all voicemail for all extensions

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
how can I easily remove all voicemail for all extensions ?
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
Did you look in Voicemail Admin, I dont want to try it and wipe out all of our messages but the fly over says it's all the messages and there is a delete button

Gary
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
no sure i'm with you.
looking at voicemail admin in freepbx 2.8 I can't see this…., I can see voicemail admin, just no pref for this…
Thanks…
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
I the system has thousands of messages that window shows something like 12… I have tried to delete using it but no joy, it does not seem to work.
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
do it via a shell.

either log into the box as user asterisk

(or as root `su asterisk`)

(PLEASE DON'T DO THIS AS ROOT)

go to /var/spool/asterisk/voicemail

issue the find command with option to remove all wav files:

find . -name "*.wav" -print | xargs rm

you'll need to repeat the command with uppercase *.WAV as files are stored both ways (i don't know why that's the case)

THIS WILL BLOW OUT YOUR RECORDINGS (OUT GOING ANNOUNCEMENTS, BUSY, UNAVAIL, ETC).

back those up first.
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
Thanks, Ok so I can do it but it wipes all recorded messages… can we exclude these ?
I have to say, really we should have a solution for this, it seems odd there isn't one.
Also after they are wiped I suppose the recorded item will still show in the GUI but there will be no file ?
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
Looking at my system, using File Manager in Webmin, I can see that every msgnnnn.wav file has a matching .txt file that also needs to be removed.

Depending on the number of extensions you have, manual deletion may be an option.

All relevant file names seem to take the form msgnnnn with suffixes wav, WAV or txt. Couldn't find be limited to that? (my Linux skills are very close to zero so ...)
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
Am I alone in thinking this needs attention and we should be able to delete en mass ?
Possible module for this ?
Thanks.
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
just add "msg" at the front of the *

so:

Code:
       find . -name "msg*.wav" -print | xargs rm


that will prevent you from blowing out the recordings for each mailbox.
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
Thanks what about the .TXT files can all those go ? and what would the command look like ?
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
safe to remove the text files, too.

you can execute the following to do it in one command:

Code:
find . -name "msg*.*" -print | xargs rm

just remember, don't do this as root, and get to /var/spool/asterisk/voicemail first. if you execute this anywhere else, you might have problems.

so, here's the complete sequence:

Code:
su asterisk

cd /var/spool/asterisk/voicemail

find . -name "msg*.*" -print | xargs rm

if you login as user asterisk, then don't 'su asterisk' only execute that if you're logging in as root.

if you want to see what files are going to be deleted first, just execute this first:

Code:
find . -name "msg*.*" -print | more
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
Thanks,
Did that but at…

cd /var/spool/asterisk/voicemail

I have these

default device

and

find . -name "msg*.*" -print | more

appears to do nothing.
Thanks.
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
what version of piaf and asterisk are you running?

try this and post the results:

Code:
cd /

find . -name "msg*.*" -print
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
and post results for this

Code:
cd /

find . -name "*.wav" -print
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
Asterisk 1.4.21.2
pbxinaflash 1.2.9


output

./var/spool/asterisk/monitor/g301-20110526-164503-1306424691.255.wav
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
and your voice mails are still all there?

out of the box, your voice mail should be store here:

/var/spool/asterisk/voicemail

you seem to only have one recording, which is a recorded call.

did you get any output when you did

Code:
cd /
find . -name "msg*.*" -print

could one of your previous attempts earlier in the thread have already deleted all of the voice mails?

also, remember, unix is sensitive to case, so ensure you try "MSG*.* and "msg*.*"
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
disk still shows 72% full

root@pbx:/ $ find . -name "msg*.*" -print
./usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/BSD/Resource/msgrcv.al
./usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/BSD/Resource/msgsnd.al
./usr/lib/python2.4/email/test/data/msg_24.txt
./usr/lib/python2.4/email/test/data/msg_03.txt
./usr/lib/python2.4/email/test/data/msg_01.txt
./usr/lib/python2.4/email/test/data/msg_38.txt
./usr/lib/python2.4/email/test/data/msg_19.txt
./usr/lib/python2.4/email/test/data/msg_11.txt
./usr/lib/python2.4/email/test/data/msg_18.txt
./usr/lib/python2.4/email/test/data/msg_30.txt
./usr/lib/python2.4/email/test/data/msg_15.txt
./usr/lib/python2.4/email/test/data/msg_36.txt
./usr/lib/python2.4/email/test/data/msg_14.txt
./usr/lib/python2.4/email/test/data/msg_35.txt
./usr/lib/python2.4/email/test/data/msg_12.txt
./usr/lib/python2.4/email/test/data/msg_02.txt
./usr/lib/python2.4/email/test/data/msg_08.txt
./usr/lib/python2.4/email/test/data/msg_33.txt
./usr/lib/python2.4/email/test/data/msg_25.txt
./usr/lib/python2.4/email/test/data/msg_20.txt
./usr/lib/python2.4/email/test/data/msg_44.txt
./usr/lib/python2.4/email/test/data/msg_12a.txt
./usr/lib/python2.4/email/test/data/msg_43.txt
./usr/lib/python2.4/email/test/data/msg_40.txt
./usr/lib/python2.4/email/test/data/msg_27.txt
./usr/lib/python2.4/email/test/data/msg_10.txt
./usr/lib/python2.4/email/test/data/msg_28.txt
./usr/lib/python2.4/email/test/data/msg_31.txt
./usr/lib/python2.4/email/test/data/msg_05.txt
./usr/lib/python2.4/email/test/data/msg_32.txt
./usr/lib/python2.4/email/test/data/msg_17.txt
./usr/lib/python2.4/email/test/data/msg_34.txt
./usr/lib/python2.4/email/test/data/msg_42.txt
./usr/lib/python2.4/email/test/data/msg_29.txt
./usr/lib/python2.4/email/test/data/msg_09.txt
./usr/lib/python2.4/email/test/data/msg_39.txt
./usr/lib/python2.4/email/test/data/msg_21.txt
./usr/lib/python2.4/email/test/data/msg_13.txt
./usr/lib/python2.4/email/test/data/msg_23.txt
./usr/lib/python2.4/email/test/data/msg_37.txt
./usr/lib/python2.4/email/test/data/msg_41.txt
./usr/lib/python2.4/email/test/data/msg_22.txt
./usr/lib/python2.4/email/test/data/msg_16.txt
./usr/lib/python2.4/email/test/data/msg_07.txt
./usr/lib/python2.4/email/test/data/msg_06.txt
./usr/lib/python2.4/email/test/data/msg_26.txt
./usr/lib/python2.4/email/test/data/msg_04.txt
./usr/share/man/man2/msgop.2.gz
./usr/share/man/man2/msgrcv.2.gz
./usr/share/man/man2/msgctl.2.gz
./usr/share/man/man2/msgsnd.2.gz
./usr/share/man/man2/msgget.2.gz
./usr/share/man/man0p/msg.h.0p.gz
./usr/share/man/man1/msgexec.1.gz
./usr/share/man/man1/msgfilter.1.gz
./usr/share/man/man1/msguniq.1.gz
./usr/share/man/man1/msgfmt.1.gz
./usr/share/man/man1/msginit.1.gz
./usr/share/man/man1/msgcmp.1.gz
./usr/share/man/man1/msgconv.1.gz
./usr/share/man/man1/msgcat.1.gz
./usr/share/man/man1/msgmerge.1.gz
./usr/share/man/man1/msgcomm.1.gz
./usr/share/man/man1/msgunfmt.1.gz
./usr/share/man/man1/msgattrib.1.gz
./usr/share/man/man1/msgen.1.gz
./usr/share/man/man1/msggrep.1.gz
./usr/share/man/man3p/msgctl.3p.gz
./usr/share/man/man3p/msgget.3p.gz
./usr/share/man/man3p/msgsnd.3p.gz
./usr/share/man/man3p/msgrcv.3p.gz
./usr/include/sys/msg.h
./usr/include/asm/msgbuf.h
./usr/include/linux/msg.h
./usr/src/kernels/2.6.18-92.1.6.el5-i686/scripts/kconfig/lxdialog/msgbox.c
./usr/src/kernels/2.6.18-92.1.6.el5-i686/include/asm-i386/msgbuf.h
./usr/src/kernels/2.6.18-92.1.6.el5-i686/include/linux/msg.h
./usr/src/kernels/2.6.18-92.1.6.el5-i686/include/linux/sunrpc/msg_prot.h
./usr/src/asterisk/formats/msgsm.h
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
actually it's call recordings that seem to taking all the space up, how do I delete all of those ?
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
call recordings are stored here:

Code:
/var/spool/asterisk/monitor

to list all the recordings to verify:


Code:
ls -lash /var/spool/asterisk/monitor


to delete them:


Code:
su asterisk
cd /var/spool/asterisk/monitor
rm ./*.wav

that should do it.
 

womble1

Guru
Joined
Oct 19, 2008
Messages
632
Reaction score
6
Thanks now I have this…

asterisk@pbx:/var/spool/asterisk/monitor $ rm ./*.wav
bash: /bin/rm: Argument list too long
 

Members online

Forum statistics

Threads
25,812
Messages
167,763
Members
19,241
Latest member
bellabos
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top