Cli command to return the number of channel in use


(Wifx) #1

Hello !

I need to monitor the number of channels in use on a trunk.

Found this command to get the informations :

asterisk -rx “pjsip list endpoints” | grep SunrisePJSIP | grep “[0-9]”

The return :

image

I just want the number of channels to be return by the command, What am I doing wrong ?


#2

asterisk -rx "pjsip list endpoints" | grep SunrisePJSIP | grep -o [0-9]


(Wifx) #3

Your the boss !! Thank you !!!