[asterisk-users] notification mail to an user if his vmbox is full (was: Re: dialplan tips)

2009-07-24 Thread Philipp Kempgen
harry R schrieb:

 2) about asterisk voicemail maximum message limit, is it possible to send a
 notification mail to an user if his vmbox is full ? How can i do that if
 it's possible.

Write a cron job to check if one of the mailboxes is full
(ls -l /var/spool/asterisk/voicemail/vmContext/mailBox/INBOX/msg*.txt | wc -l)
or use the externnotify parameter in voicemail.conf (3rd arg tells
you the number of messages in the INBOX folder)
and send an email.
You could read the email address from voicemail.conf or from the
voicemail Realtime family/table depending on what you use.


Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  -  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 -  http://www.amoocon.de
-- 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] notification mail to an user if his vmbox is full (was: Re: dialplan tips)

2009-07-24 Thread Steve Edwards
 harry R schrieb:

 2) about asterisk voicemail maximum message limit, is it possible to 
 send a notification mail to an user if his vmbox is full ? How can i do 
 that if it's possible.

On Fri, 24 Jul 2009, Danny Nicholas wrote:

 for question 2, this depends on how voicemail.conf is setup.  By 
 default, an asterisk mailbox is considered Full when 100 messages are 
 stored (see voicemail.conf.samples), but this can be changed up to . 
 Therefore you would just need a job to look for the creation of the max 
 file and send a mail accordingly.  I'm not enough of a scripter to do 
 this in bash, but here's a find and grep that would tell you when a 
 user's box was full (based on default params):

 find /|grep msg0099.txt|grep INBOX

I think Philipp's suggestion of externnotify is the right path if it 
fit's the OP's needs. Polling the filesystem periodically always seems a 
waste of system resources.

In case externnotify doesn't fit the bill, this find command while 
thorough, is going to search the entire filesystem looking for 
msg0099.txt.

It would be more efficient using a command like:

find /var/spool/asterisk/voicemail/*/*/INBOX/msg0099.txt

(Assuming Asterisk's boxes are in the usual place.)

On my little under-powered and over-priced FitPC which has 186,000 files, 
the first find command takes about 3 minutes while the second is 
sub-second.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users