Every once in a while, our asterisk process hangs.
We haven't been able to figure out why, but
in the mean time, we've operated around the issue
using the brute force script below.  I hope you find 
this useful.

Cheers
/ed guy


#!/bin/bash

# routine to make sure asterisk is running well, and if not restart it.
# Ed Guy, [EMAIL PROTECTED], September 1, 2003


# crontab entry
# * * * * * /root/bin/asteriskCheck.sh

asterisk=/usr/sbin/asterisk
logfile=/tmp/asta.log


# (echo "Asterisk check " ; date ) >> $logfile

# connect to asterisk and run a simple command.
$asterisk -r -x 'show version' >/dev/null
if [ "$?" -ne 0 ]
then
        (echo "Asterisk Problem " ; date ) >> $logfile
        killall -9 asterisk
        sleep 3
        $asterisk
fi


_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to