cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1867
Views
1
Helpful
3
Replies

Jabber / Accessing historical data for jabber

ronnieperetz
Level 1
Level 1

My objective is to use Jabber historical data to know the activity of a user during the day.

I want to build an application that builds the Jabber activity throughout the day. It would query everyone’s status every X minutes, to see if each person’s status has changed, and if it has changed, it would write a new record to our log or database.

For example here is sample data for two users, but we want all users.

User="X" Status="Away" Datetime="10:20 AM 2016-09-06"

User="Y" Status="Available" Datetime="10:20 AM 2016-09-06"

User="X" Status="Away" Datetime="10:25 AM 2016-09-06"

User="Y" Status="Available" Datetime="10:25 AM 2016-09-06"

User="X" Status="Away" Datetime="10:30 AM 2016-09-06"

User="Y" Status="Available" Datetime="10:30 AM 2016-09-06"

User="X" Status="Available" Datetime="10:35 AM 2016-09-06"

User="Y" Status="Available" Datetime="10:35 AM 2016-09-06"

User="X" Status="Available" Datetime="10:40 AM 2016-09-06"

User="Y" Status="Available" Datetime="10:40 AM 2016-09-06"

User="X" Status="Do not disturb" Datetime="10:45 AM 2016-09-06"

User="Y" Status="Available" Datetime="10:45 AM 2016-09-06"

Can this be done?

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

Jabber instant messaging 'historical' information is generally achieved via the compliance mechanisms, which write all IM activity to a configured external database: Instant Messaging Compliance for IM and Presence Service on Cisco Unified Communications Manager, Release 10.5(1) - Pla…

I'm not aware of any similar way to store/retrieve historical presence updates/status, however.  You may want to refer to the IM&P 'Presence Web Service' here, which allows an application to subscribe to a list of CUCM contacts and either receive an HTTP notification when any changes occur, or poll periodically for any changes: https://developer.cisco.com/site/im-and-presence/

You should be able to build a service that subscribes to presence for all desired individuals, and then either polls-for or receives event notifications of updates, and write that to a database for querying...

Thank you for you fast replay.

I looked at your example on presencequickcontactsexample.html page based on your SDK. It does work.

Having said that it does not work with I run the page in IE or even IE Edge I get this type of error, not sure what's the issue.

Could not connect: <stream:error xmlns:stream="http://etherx.jabber.org/streams"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>

Having said that this solution works great for client side, the code runs in the browser in JavaScript.

You wrote "You should be able to build a service"

Can you help understand more on how I can get server side service that does this. Can you recommend me a tool that I can run this type of script outside the html page?

Also what is the best way to get all the contacts in the company status logged?

currently I just see my own contacts.

Would I need a master account that has everyone as a contact? is there another way?

Certainly 'you can build a service' refers to a wide range of possibilities and issues/caveats

You mention that you are 'building an application', so I assume you have a platform in mind: programming language X, on operating system Y, hosted on servers Z.  The good news is that the Presence Web Service supports the nearly ubiquitous REST API pattern, and virtually any development platform will be able to easily consume REST APIs.

Can you clarify 'all the contacts in the company status logged?'  If you want to get a listing of all of the user IDs in CUCM, you can look at the <listUser> request of the AXL SOAP API:

https://developer.cisco.com/site/axl/documents/latest-version/axl-soap.gsp

As that could return a large amount of data, you will likely want to consider the paging mechanisms:

https://developer.cisco.com/site/axl/documents/axl-developer-guide-v11-5/#data-throttling-and-performance