For those that have added Blinkt! to your RasPi, we have a new system status utility that displays the status of the following on the LEDs:
Code:
# Port 7 - Asterisk status (Green=UP Red=DN)
# Port 6 - Apache status (Green=UP Red=DN)
# Port 5 - MariaDB/MySQL status (Green=UP Red=DN)
# Port 4 - IPtables status (Blue=UP Red=DN)
# Port 3 - Fail2Ban status (Blue=UP Red=DN)
# Port 2 - SIP trunks status (Green=AllUP Red=SomeDN Purple=NoneFound)
# Port 1 - PJSIP trunks status (Green=AllUP Red=SomeDN Purple=NoneFound)
# Port 0 - IAX2 trunks status (Green=AllUP Red=SomeDN Purple=NoneFound)
We recommend adding the following Blinkt! entries to /etc/crontab to update the LEDs every 5 minutes from 7 am to 7 pm. rainbow.py will clear the display at 8:01 pm.
Code:
1 20 * * * root /root/rainbow.py > /dev/null 2>&1
*/5 7-19 * * * root /root/status.sh > /dev/null 2>&1
Install the software with the following commands:
Code:
cd /root
wget http://incrediblepbx.com/blinkt-status.tar.gz
tar zxvf blinkt-status.tar.gz
rm -f blinkt-status.tar.gz
We also recommend disabling or removing rainbow.py at the bottom of /usr/local/sbin/pbxstatus.
If you don't use IAX2, you might want to consider modifying /root/status.sh to substitute an LED showing "active calls":
Code:
port0="$BLUE"
test=`asterisk -rx "core show channels" | grep "0 active calls"`
if [[ $test ]]; then
port0="$RED"
fi