Hi all,
I’m trying to pull a list of my online peers from the CLI
The command “sip show peers” gives me the FULL list.
My question is, how can I filter it to:
- online (status = OK) only
- get the Name only
Example:
original output
VOIP*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
2012/2012 xxx.xxx.xxx.xxx D No No A 5062 OK (102 ms)
2015/2015 xxx.xxx.xxx.xxx D No No A 5062 OK (93 ms)
2026/2026 xxx.xxx.xxx.xxx D No No A 5062 OK (97 ms)
2028/2028 xxx.xxx.xxx.xxx D No No A 5062 OK (98 ms)
2035/2035 xxx.xxx.xxx.xxx D No No A 5160 OK (10 ms)
2036/2036 (Unspecified) D Yes Yes A 0 UNKNOWN
3000/3000 xxx.xxx.xxx.xxx D No No A 5160 OK (9 ms)
3100 (Unspecified) D No No A 0 UNKNOWN
3101 (Unspecified) D No No A 0 UNKNOWN
4001/4001 xxx.xxx.xxx.xxx D No No A 5062 OK (102 ms)
4002/4002 xxx.xxx.xxx.xxx D No No A 5062 OK (100 ms)
4003/4003 (Unspecified) D No No A 0 UNKNOWN
4098/4098 xxx.xxx.xxx.xxx D No No A 5160 OK (10 ms)
4099/4099 xxx.xxx.xxx.xxx D No No A 5062 OK (98 ms)
4100/4100 xxx.xxx.xxx.xxx D No No A 5062 OK (101 ms)
4101/4101 xxx.xxx.xxx.xxx D No No A 5062 OK (103 ms)
4102/4102 xxx.xxx.xxx.xxx D No No A 5062 OK (103 ms)
4103/4103 xxx.xxx.xxx.xxx D No No A 5062 OK (104 ms)
4104/4104 xxx.xxx.xxx.xxx D No No A 5062 OK (103 ms)
4105/4105 xxx.xxx.xxx.xxx D No No A 5062 OK (98 ms)
4106/4106 xxx.xxx.xxx.xxx D No No A 5062 OK (104 ms)
The list that I need to be outputed is:
2012
2015
2026
2028
2035
3000
4001
4002
4098
4099
4100
4101
4102
4103
4104
4105
4106
Is there a way to do this?
Thanks