Q: SleekXMPP Muc Room List and Discovering I'm new to XMPP :) I've been working with Ejabberd and sleekXMPP.
My question is How can online rooms are listed with sleekXMPP?
Thank you 

A: I struggled with this for a while as well.  Listing rooms is not part of MUC (xep_0045), but is instead a part of Service Discovery (xep_0030).
Some documentation is here, but it still required some experimentation to find the 'disco_items" array key.  Note that the "iterator" parameter only has effect if you also load XEP-0059.
It works as follows:


*

*Ensure that you have 0030 loaded:
xmpp.register_plugin('xep_0030')


*Use it: (in my case this is part of the start() method of the class that extends sleekxmpp.ClientXMPP)
result = self['xep_0030'].get_items(jid='conference.your.xmpp.server.com', iterator=True)

for room in result['disco_items']:
    print "Found room %s, jid is %s" % (room, room['jid'])


A: Akom has a good approach but personally I had problems with the iterator parameter.
A full example of Service Discovery implementation is available on :
https://github.com/fritzy/SleekXMPP/blob/develop/examples/disco_browser.py
With these features you are able to get identities, info and features of your XMPP server just by doing :
items = self['xep_0030'].get_items(jid='conference-server.com', node='', block=True)

And then :
for identity in info['disco_info']['identities']:
    print('  - %s' % str(identity))

for feature in info['disco_info']['features']:
    print('  - %s' % feature)

for item in items['disco_items']['items']:
    print('  - %s' % str(item))

