Asterisk peer status check
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
export DISPLAY=:0.0
declare -a trunks=('callcentric' 'didlogic' 'perment' 'nick1');
for i in ${trunks[@]}; do
peer_status=$(asterisk -x " sip show peer ${i} " | grep -i status | cut -d' ' -f11 )
if [ "$peer_status" != "OK" ]; then
echo ${i} $peer_status
else
echo ${i} $peer_status
fi
done
exit 0
0 comentarios:
Publicar un comentario
Suscribirse a Enviar comentarios [Atom]
<< Inicio