Showing posts with label sip unreachable alerts. Show all posts
Showing posts with label sip unreachable alerts. Show all posts

Wednesday, 26 December 2018

sip unreachable alerts

If sip unreachable then send auto mail

vim /home/UNREACHABLE.sh


#!/bin/bash
COUNTER=0
DATE=`date "+%d.%m.%Y. %H:%M"`
Status=`/usr/sbin/asterisk -rx "sip show peers" |grep UNREACHABLE`
SIP=`/usr/sbin/asterisk -rx "sip show peers" |grep UNREACHABLE |wc -l`

if [ $SIP -gt 1 ]
then
echo -e "$Status" | mail -s "SIP Peer Unreachable `hostname` $DATE" example@mail.com
echo $Status
else
   echo "None of the condition met"
fi


Then set in crontab

crontab -e


* * * * * /bin/sh /home/UNREACHABLE.sh


thanks

install winrar on CentOS 6.x

Steps to install  WinRar  on Cent Os machine in order to un-rar a rar archive transferred from windows machine. Download Links For L...