I am using Openfire as an XMPP server for building a customer support Bot framework.
I am planning to make use of channels/groups for the same. I am keen to use channels as there might be multiple human agents and a bot listening to the same conversation. So I am likely to have a group/channel for each individual.
I want the messages to be read and processed by my custom server. How do I go about this ? I couldn't find any plugin that allows me to intercept the messages and return back processed response.
Any recommendations ?
You can also create your an own openfire bot plugin if you are familiar with Java (small example: https://rmsol.de/2018/03/06/Openfire_Bot/). Otherwise create bot as a client lilke dontknow suggested (The "bot/client" will join every channel you like and e.g. listen for specific keywords)
I figured out that since Openfire is an XMPP Communication software, its best to just use a custom XMPP client ( on your own server ) to listen to all the messages and process it from there and reply back from the XMPP Client as well.
So if I have a Nodejs server, I will create a Node XMPP Client and listen to XMPP messages coming via Openfire from other users, will process them and reply back with custom messages which Openfire will send back to the user.
Related
I want to make it easy for people to write bots for my ejabberd server by allowing them to register webhooks with their bot JIDs. Basically, I want them to be able to interact with my ejabberd server using HTTP to send and receive XMPP stanzas instead of having to maintain persistent XMPP connections. For example, the bots could simply make HTTP calls to my ejabberd server to send XMPP stanzas, and then the server would send messages to the bots by making HTTP calls to the registered webhooks. This would allow the bots to be simple HTTP servers that could easily scale horizontally.
I did find this module (https://github.com/adnam/ejabberd-webhooks) but it doesn’t seem to do exactly what I want and also it doesn’t seem to be maintained. Is there a well-maintained (maybe official) ejabberd module that does this? Maybe there is an XEP I’m not aware of that ejabberd implements? Are there other XMPP servers that support this? Thank you in advance!
the bots could simply make HTTP calls to my ejabberd server to send XMPP stanzas,
You can do this installing mod_rest in ejabberd:
https://github.com/processone/ejabberd-contrib/tree/master/mod_rest
and then the server would send messages to the bots by making HTTP calls to the registered webhooks.
I am not aware of any simple module to do this. There are Push XEPs, see https://xmpp.org/extensions/xep-0357.html but I think ejabberd Community Server does not implement everything required, only the Business Edition.
I'm developing an instant messaging app on android with SMACK library that uses OPENFIRE as a xmpp server. I want to get last message of each conversation from MessageArchiveManager in openfire server that was enabled by MONITORING SERVICE plugin(based on XEP-0313).
I know that mamManager.queryArchive() can gets the messages that related to specific jid or can get a specific number of messages that exists in server(with no custom sepration), but we suppose that smack doesn't knows which JIDs has conversation on server!
One solution is that send request per each ROSTER entry, but it has heavy cost when it contains numerous contacts and perhaps we have a conversation with anybody out of Roster. Is there any way or plugin or another extension to do this?
is it possible to listen / monitor messages send from a user to an another on Openfire Server using Smack API
No, that would be a privacy violation, because it would mean that a third party is able to intercept and read messages between two JIDs.
Of course, you can modify any XMPP server to relay certain XMPP stanzas to a third party. But since there is no XEP that defines a API for such a mechanism, it's also not available in Smack.
I'd like to allow a client to keep track of the list of rooms on a multi-user chat service provided by ejabberd. This would require receiving notifications of room creation/destruction and presence events for all rooms on the server.
Is there a way to subscribe to receive notifications about such events without sending a presence event to, and therefore joining the roster of all rooms?
FWIW, I've found out how to send a request for the room list (http://xmpp.org/extensions/xep-0045.html#disco-rooms) and I've been trying to make sense of the pubsub system (http://xmpp.org/extensions/xep-0060.html#glossary) in hope that I'd find a solution there but nothing seems obvious.
What's the right(TM) way to do this in XMPP land?
Ubuntu 10.04 + ejabberd 2.1.5-3+squeeze1 + Strophe.js & BOSH & jQuery
You need to develop custom code for that, especially to trigger packets sending on the event you are interested.
I would like to initiate a Chat between two users A and B from my web application. So I create an XMPP Message using Smack Client API or directly from an OpenFire Plugin:
Send a Message by Smack from A to B
Send a Message by Smack from Server to B with replyTo A
XEP-0033 allow "replyTo address" supported by OpenFire but not suported by IM Clients.
It seems "from" can't be overrided by a client or an OpenFire plugin. I also think GTalk will not accept an xmpp message from userA#gmail.com to userB#gmail.com by ServerToServer protocol.
Is there an other way to do this ? I want my web application to forge a message from UserA to UserB. But this webapp is not A or B.
Best Regards,
Jp
Any XMPP server should ignore the from address in a stanza and stamp the one that it get's from the connection into the stanza it sends on. This is a specific feature of XMPP compliant servers and is used to stop address spoofing and spam etc. You'd probably have to edit the source of a server and change it's behaviour. This is dangerous though and I wouldn't reccomend it if you'll be federating with other servers.
J