Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to view Sip registrations via CLI? 1

Status
Not open for further replies.

NewNic

IS-IT--Management
Nov 14, 2003
524
US
Anyone know how i can view sip user registrations via SM cli?
 
sm console get allrslocal

or something like that

try sm console help or smconsole help

Something like that
 
If you find this info out, let me know. Would be interesting to see.
 
kyle nailed it,

sm console Get RegistrationData

the help on sm console gave lots of different syntax options

Thanks Kyle
 
if you have more than 1 pair of SMs, make sure to run it on each to get everyone.

I had whipped up a sed script from hell that made it CSV to pop in a database.

There's also the java API for SMGR, but not as simple as CLI.

careful not to script stuff to do it every minute. There was a PSN years ago that you could crash things.

What exactly are you trying to accomplish? There's an operationalEvent.log file in the SM that tracks users logging in or out or registrations expiring. If you have root and make a custom syslogger to send that file to a Splunk or Graylog or to your own syslog catcher, that would be helpful if you're trying to build a real-time dashboard of which registrations are active instead of just dumping the whole list.

Again, depends on the size of your system and exactly what you're trying to accomplish.

Be carfeul :)
 
i was just curious, im not convined looking at registrations in smgr is always accurate and wanted to compare what the SMs think compared to smgr
 
It is accurate. In the sense that SMGR is polling all those SMs live when you refresh registrations.

That's why SMGR shows a timestamp for when it grabbed them.

Unless you're using the SMGR API. Last I read, the API only uses SMGR's cache of the last time a human clicked to refresh.

But please, report back if you find SMGR is lying to you!

Also, my previous post about operationalEvent.log on the SMs might be helpful to see if particular registrations are dropping/expiring/etc
 
A few I use.

See all monitored sip entities and parses it out in human readable format.
Code:
sm console GET AllMonitoredEntities |sed s/.*name=/''/|sed s/", 201"/" 201"/g|awk -F, 'BEGIN{sp=" ";sp2=" "}{print $1;for (i=1;i<NF;i++) {if(i>2) printf("%s",sp2) ; print sp""$i }}'|egrep -i "status=|MonitoredAddress|up at|down at|^\""|sed s/".*MonitoredAddress\["/" "/g|sed s/"transitions=\["/""/


Code:
sm console GET allcallcountsm


To deny service:
Code:
sm console SET DenyNewService True


To accept service:
Code:
sm console SET DenyNewService False

Get all SIP user registration
Code:
sm console Get AllrsLocal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top