Openfire with Conversations

Good Day everybody,

im planning to make an Android Chat Application based on Openfire which is installed and configured onto Windows Server 2012, as Client i tried Spark on Windows it works and everything looks good, but i want to make a Client on Android Phones and i found Conversations IM looks cool, can OpenFire work with Conversations, and if yes what are the requirements to connect Conversations with Openfire.

Thanks alot in advance.

Best
Ali

Conversations is a XMPP client. Just like Spark and others. So, it surely would work with Openfire. There can be some incompatibility because of bugs. Say Conversations currently has problems retrieving group chat history because of bugs in Openfireā€™s Monitoring plugin. Xabber currently works better with group chat. You connect with Conversations the same way as with Spark. By providing proper domain name and making sure this domain name is resolvable in the network you are connected to (either internet or local network). Conversations wonā€™t work with IP. Xabber is more forgiving and lets you add IP as a host, if your domain is not in DNS. Same with Spark. But it is preferable to have proper domain/DNS setup for everything to work correctly.

Thank you for the answer and the valuable information,
As i understand now For configuring OpenFire with Conversations i need a public DNS where i host my domain and my questions are:
1- what should i create of records in my DNS to make it works.
2- which ports should i open on Firewall.
3- is there a specific Version of OpenFire should i use or it,s fine just to use the latest Version.
Thanks again

If you want your server be accessible from internet, then usually you would need a SRV record.

_xmpp-client._tcp.domain.com. 18000 IN SRV 0 5 5222 server.domain.com.

Where domain.com is your XMPP domain and server.domain.com is FQDN of your server hosting Openfire. This way a client connecting to domain.com will find a server providing XMPP service. 5222 port is used for a client to connect to a server, so you should open it.

Latest version is better as it has more features and fixes.

Hello Again and thanks for replies.

i did exactly what you said,
_xmpp-client._tcp.accessdoip.com. 18000 IN SRV 0 5 5222 on my Public DNS.
The Firewall is open for the mentioned port it,s already tested with spark.
but im still getting Incompitable serverā€¦ any solutions please

Do you mean you can connect with Spark from internet, but not with Conversations? Is this the exact error you get ā€œIncompatible serverā€?

Yes exactly,

I havenā€™t seen such error. So, in Spark you put accessdoip.com as domain? This is also your XMPP domain? It is shown on first page of Admin Console. Btw, you donā€™t see a warning about DNS in Admin Console?

Anyway i did what you suggested and used xabber instead of conversation it works and im able to connect , however after i added a user to chat it shows in opebfire that both are onlinebut when im on the xabber it shows not authorized and when i write something it doesnt send what i wrote

I have suggested Xabber as it works a bit better with group chat history currently. It also allows to put IP as a host, but still using proper domain and DNS setup is the best way with any client, so you wonā€™t run into strange issues.

When you add someone in XMPP, the other side has to authorize/approve you before you can see their presence (online/away/etc.).

As for messages not going through, you havenā€™t answered my questions above. This is important. What you put into Spark and Xabber and what is your XMPP domain shown in Admin Console?

No no warning

I put user@accessdoip.com which is my domain,
Im able to login, but when adding someone by entering FQDN for example im test1@accessdoip.com and added a user its test2@accessdoip.com the test 2 should receive aprrove message /authorize messageā€¦ But this is not happening

And in admin console it shown that both are online but nothing special

Canā€™t help any further. This would require deep investigation about what is happening on your server, domain, etc. You can try checking Openfire logs, client logs. I have found this about Incompatible server error https://github.com/siacs/Conversations/issues/2322 Maybe you donā€™t have TLS encryption enabled on your server. You would need a proper and trusted certificate for your domain installed on Openfire.

We use the Yaxim client on Android. It works well with the latest Openfire version, also running on Windows 2012 server. Our iPhone clients use the Monal app. Both work well.

1 Like

Thanks for your cooment, i will do so like what you said, but here i have a question how to avoid the problem of adding a user but it shows not authorized.

I am not sure what you mean. I add all users from the Openfire Admin Console. I do not allow self enrollment through Spark or the other clients. Sorry I wasnā€™t able to help you with that problem.

1 Like

I mean after we adding the users in admin console, when im logged in and want to chat im client A want to send a chat request to client B, but B receive nothing from A not add no messages. Do you know any possible solution

@Jim_Bishop i think you are missing the point a bit here. The problem is not with the client. But most probably with the server/DNS/Domain/etc configuraion on @ali_g side. But as iā€™ve said, without a deeper and direct view on his setup this is hard to investigate or advice something. He can try Yaxim instead of Xabber or Conversations, but probably would still get the same error.

1 Like

Out of curiosity i just tried this:

  • On AWS (Amazon Web Services) i have started a new instance with Windows Server 2019 (i have tried 2016 before and i donā€™t think there is a difference with 2012).
  • Applied security groups which allow RDP and 5222 port from my home public IP.
  • Installed Openfire 4.3.2 64-bit with bundled Java in this instance.
  • Ran the web setup. The only thing i have changed, i have set XMPP domain to ā€˜openfireā€™. Left server Hostname default. Used embedded database option.
  • After a setup i have created two users: user1 and user2.
  • On device1 connected to my home wifi i have logged in with Xabber as user1@openfire. It showed an error and i went to Connection Settings and checked Custom host and put my instanceā€™s public IP instead of ā€˜openfireā€™. Then it connected.
  • Did the same on device2 with user2@openfire.
  • Added user2@openfire as contact on device1.
  • Authorization request appeared on device2 and i have approved it.
  • Authorization request appeared on device1 and i have approved it.
  • Both users can see each other status and chat.

Granted. This is not a proper setup. I have used IP address as a workaround as i donā€™t have a domain to use. But this works. As a workaround you can also try using public IP of your server. But usually SRV record should point to a server based on domain name alone and no IP is needed. When you add a contact in Xabber, make sure you use user@domain, not just user.

1 Like