listAllUserAgent.sh

#!/bin/bash

for a in `asterisk -rx "sip show peers"|cut -f1 -d/` ;do asterisk -rx "sip show peer $a";done|grep 'Useragent\|Reg'