Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LINHA1=$(asterisk -rx 'sip show registry'|grep "1122442211"|cut -c 71-91);
- IPCORP=$(asterisk -rx 'sip show registry'|grep "1122113344"|cut -c 71-91);
- GRP="-241401122"
- ASSUNTO="STATUS LINHA SIP"
- EMAIL_TO='kowalski@empresa.com.br'
- RELAY='server@empresa.com.br'
- if [ "$IDT" != "Registered" ]; then
- echo 'Linha1 Nao Registrada!' >/tmp/monitorasip.txt
- cat /tmp/monitorasip.txt | mail -s 'Alert Linha1 Down!' -r $RELAY $EMAIL_TO
- ./telegram.sh "$GRP" "$ASSUNTO" "Linha1 Down!"
- else
- echo "Linha1 Registrada" | logger
- fi
Add Comment
Please, Sign In to add comment