Asterisk PJSIP monitoring

I would like some assistance in monitoring asterisk PJSIP extentions.
I have followed the instructions to monitor asterisk applications and that is working correctly however we are using PJSIP instead of ChanSIP and as a result, the sip show peers command does not return results. The closest command would be pjsip show endpoints, but this does not have a summary at the end that indicates online and offline peers.

So i need help changing this line:

$ASCLI -rx ‘sip show peers’ | awk ‘/sip peers/ { print “SipPeers=” $1 “\nSipMonOnline=” $5 “\nSipMonOffline=” $7 “\nSipUnMonOnline=” $10 “\nSipUnMonOffline=” $12}’

to accommodate PJSIP instead.
Any help would be greatly appreciated.

Additional information might be helpful:

  • Asterisk version 15 and 16 (multiple instances)
  • Active channels / calls seems to be reporting correctly

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.