[asterisk-users] Execute some kind of script when something happens with Asterisk

Patrick Plattes patrick at erdbeere.net
Tue Aug 18 03:22:27 CDT 2009


Hi,

well there are differnt ways to do it. It depends on what you want.
The start-stop scripts in /etc/init.d/ are looking for a pid file, so
they can figure out if the server is running. You can change the
script to get a message if the server is going up or down by the
script.

If you want that the server is working correctly you need more. You
need a second system and write an end-to-end test. Than you can send
out an email (or a sms) if it fails. You can check it every 30s.

The first way is easier, but you won't figure out if the server hangs.

Maybe this is also interesting
http://searchengine.of.choice/search?q=asterisk+watchdog

Bye

On Tue, Aug 18, 2009 at 9:28 AM, jonas kellens<jonas.kellens at telenet.be> wrote:
> Would it be possible to execute some kind of script when for example
> Asterisk restarts... or stops... ?
>
> How can one read the status of Asterisk so that when the service is stopped
> I could be notified by mail, by text message,... ?
>
> I don't know how to read the status of Asterisk (or the change of status) in
> a bash-script.
>
> Thanks for the reply !
>
> Kind regards,
> Jonas.
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Niemann + Frey GmbH
Bischofstraße 80
47809 Krefeld
Tel. +49 2151 5554-263
Geschäftsführer: Gerd Frey
Sitz und Registergericht: Krefeld HRB 10851



More information about the asterisk-users mailing list