Is there a way to monitor the trunk status on a CUBE using SNMP?
#show sip-ua register status
Line peer expires(sec) reg survival P-Associ-URI
===================== ============== ================== === ======== ============
XXXXXXXXXXXX -1 476 yes normal
You may be able to use either SNMP or CLI commands to monitor a trunk, but I am not familiar enough with CUBE to say for sure. SNMP is attractive, because EEM can go some of the work by polling the SNMP OID(s) and starting up an EEM script or applet when the OID is incremented. But you will have to research what MIBs are supported on CUBE. You may have to use indirect inference on the state of the trunk, since the SIP MIBs I have seen don't always have an OID for the up/down status of objects, but usually seem to have counts of various messages, that can be used to infer the state. But I am sure you can use some CLI show commands to see the trunk state, but you will have to find a way to trigger EEM periodically and use its CLI capability to do the show command you need. Then you can use the various string and/or regular expression functions to parse the CLI response to determine if the trunk is up or down.
I don't know why I just now got an email from Cisco on this issue, when your post was 6 months ago. I hope you have already found a solution.
Thank you for the answer. I was not able to find any SNMP OIDs that would be able to monitor the trunk registration.
It seems that there is a third-party application capable of tracking the state of registration: http://www.voipmonitor.org/
But, you are right, CLI and Event Management could be a good solution, and would be my next attempt if VoIP monitor doesn't work.
Its an old post but might help someone.
Python script that uses Netmiko to get output of "show sip-ua register status | i <trunk name>" gets the yes or no and assigns a 1 or 2 respectivily and then pushes that to an InfluxDB which Grafana graphs/alerts on
Probably better ways to do it now but still could not find a MIB and in my scenario the dial-peer would not go down (which I do have a OID for) so running this script every couple of mins with crontab gets me realtime alerting