Create batch file with below and run the script. It will list down the Useragent, Contact & Username.
asterisk -rx “sip show peers” | cut -f1 -d/ | grep -P ‘\d\d\d\d’ | grep -vP ‘(UNKNOWN|Unmonitored)’ |
while read PEER
do
asterisk -rx “sip show peer ${PEER}” |
grep -P “(Useragent|Contact|Username)”
echo “====”
done
Leave a Reply