Preparing Openfire for Audio/Video calls with Conversations

Later this week, the popular Android client Conversations will have an exciting new release that will allow you to make voice and video calls.

For this to work well with your instance of Openfire, it is recommended to make use of a STUN and TURN service. I’ve personally experimented with coturn, which I’ve found easy to use.

After you’ve set up the STUN and TURN service, you’ll need to configure Openfire to expose the availability of this new service to your users. You can do this easily with the External Service Discovery plugin for Openfire.

After you install the plugin, you can add your TURN and STUN services to its configuration, as shown below. This will allow clients to discover the availability of these services!

Screenshot_20200426-210743

Take care to read up on the authentication mechanisms that are available in your TURN server, to prevent unrelated third parties from making use of your bandwidth.

That’s all to it!

For other release announcements and news follow us on Twitter

2 Likes

I wonder how much effort it would take to convert the old legacy media proxy in Openfire into a modern TURN server. It can do media relaying, but it is based on an out-of-date spec. - https://igniterealtime.jiveon.com/blogs/ignite/2007/03/14/ring-ring

The other option would be to turn the jingle-nodes plugin into a TURN server. I found an old blog about that - https://igniterealtime.jiveon.com/blogs/ignite/2012/03/17/jitsi-jingle-and-openfirejs

Dear Guus

I use Openfire 4.5.1 and read your note with hope due to the actual requirements and challenges, and find various things that make me think twise on what you say

1st) Conversations is a pay app, so why we should take in count to use it, enterprise or personal benefits please!

2nd) Differences between CoTurn and the Ignite STUN server, I have installed both, but I don’t know significative differences.

3rd) I have NextCloud as a cloud store and web apps, i’m also checking Talk an Jsxc for chat, both uses a STUN server, which one should i use: Coturn or Ignite STUN?

Thanks for your note and your answer.

BTW: External Service Discovery is not working as expected, shows extrange messages.

Hi Guillermo!

Although I used the Conversations client in this blog post, the same mechanism has now already been proven to work with other XMPP clients, including Siskin and Movim. It stands to reason that with this exciting new functionality being added to the XMPP ecosystem, more options will become available in the future! Each client has its own strengths and weaknesses, which will be important to specific people in different ways.

Coturn is third-party software, as opposed to the STUN plugin that’s available for Openfire. Coturn has a lot more options (notably: TURN) which, if applied properly, will vastly improve the quality of your calls. There are probably good alternatives to coturn available - I simply have not investigated. Please share your findings!

Worked almost like a charm for me.

First i used a password with some special characters like #%$ and so on an got an error when adding the server. After changing the password it worked.

Does anone know, if its poosible to install coturn on the same server as openfire? Or should it a dedicated server?

If your server is not under heavy load, it’ll be fine to combine them on one host.

Just to note that Conversations, version 2.7.1+fcr, is available for free on the Android F-Droid repo - version added on 2020-03-14

Though Conversations, version 2.8.0+pcr, is available via the PlayStore at a small cost - version added on April 26, 2020

I found the presentation at the following link, by Conversations lead developer, Daniel Gultsch, to be interesting - The state of the XMPP Community (summer 2019): https://media.ccc.de/v/froscon2019-2448-the_state_of_the_xmpp_community#t=4

Guus my friend.
My openfire server is installed on Windows 2008 Server with Active Directory. Could you tell me how can I install Coturn?
Thank you.
Sérgio.

I am far from a coturn expert. My advice would be worse that what you can find with a few Google searches.

1 Like

Hi, tried the external-service-discovery plugin. it seems not working correctly.


Tried different version with no luck. My openfire version is 4.6.3. Any suggestions?

@guus , to offer video calls do I need to have a TURN Server configured too, or is the STUN Server , by using the openfire plugin, enough to get this working ?
Would like to offer video calls for my small privat server.

Thank you

That really depends on the very specific network conditions between the intended participants. If they’re all on the same network segment, with routable IP addresses without things like NAT and restrictive firewalls, STUN isn’t even needed. In many cases, STUN is ‘enough’, but there are plenty of cases where you need a full TURN server. Without doing a deep-dive into your network setup, it’s hard to predict what is needed (it is even harder to predict if those requirements are likely to change in the future, for example, when your company grows). There sadly is not a one-size-fits-all solution.

Hi Guus

My network setup is a NATted openfire server and the users are outside of our network. It’s a very basic and simple setup and I assume that a STUN server (by using the STUN plugin) will be just enough. Will see what happens.

Thank’s for the info.

1 Like

Hi russrao, you see on that way because you don’t have set the language of your server in english. Try to do that and then you are going to see the interface of the plugin in the right way. Sorry for my english

thank you. problem solved!

Hello Gus, please give instructions on how to install koturn, I can, if possible, video instructions on how to install koturn and then use it all in openfire. I have installed an openfaer server and have clients in my conversations.

I stand by my earlier comment: I am far from a coturn expert. My advice would be worse that what you can find with a few Google searches.

help implement the assembly of the video, how you installed cothurn and embedded it on openfire. Can I chat with you on telegram or instagram messenger?

I am using conversations android app. I was able to get things working with TURN but not TURNS (TURN over TLS). When using TURNS, I do see activity in the turnserver logs, but for some reason calls just do not connect. coturn seems to work properly and does load all certificates properly. Is this a conversations app issue? Or did I misconfigure something? Was anyone able to have TURNS working?

Wow, what a journey… So I’ve been trying to get voice calls to work with the Conversations App and an Openfire server running on my Windows home server for a veeery long time. At the end it’s really not that difficult but the documentation in this regard is simply lacking. I’m no expert, I just tinkered until it worked and here is my setup in the hope it helps someone else.

What you need to get voice calls to work is a STUN / TURN server. In my case a simple STUN server did not suffice, I also needed the TURN server before the calls would connect. That being said at the outset calls did work when both clients were in my Wifi. As soon as one client was using mobile data and called a client in my Wifi the phone rang but the call did not connect. That’s where STUN / TURN comes in to save the day.

What you need to do:

1.) Install and configure a STUN / TURN server - On my Windows platform the “Eturnal” STUN / TURN server worked great - www.eturnal.net. Edit the configuration file “eturnal.yml”. Here’s what I did:

  • Set a “secret” / password. You will need this later for the Openfire “External Service Discovery” plugin.

  • Set the local IP on which the server should listen (optional)

  • Set the UDP port range the TURN server should use to relay calls. You will need this later to setup port forwardings on your router.

2.) The STUN / TURN server must be in your routers DMZ (exposed host on my Fritzbox). Otherwise it will not work. Consider the security implications before performing this step! I ended up using a second interface on my home server specifically for the Eturnal server and exposed this interface only.

3.) Configure port forwardings on your router. Since I exposed the interface over which the STUN / TURN server is reachable no port forwardings were necessary here. I did however need to configure the UDP relay port range for the TURN server.

  • Allow access for the UDP relay ports you defined in the configuration file of the Eturnal server.

  • Configure your (Windows) firewall to allow incoming traffic to port 3478 (TCP and UDP)

4.) In Openfire install and configure the “External Service Discovery” plugin. After installing the “External Service Discovery” plugin go to “Server → Media Services → Ext. Service Discovery”.

Please note: The below setup works with my Eturnal server. Not sure if you need to tweak ports etc… for this to work with other servers such as Coturn.

You basically need to add entries here for STUN and a seperate entry for TURN. I also added an individual entry for “Transport” UDP and TCP.

So at the end I had four entries:

1.) Host IP; 3478; Description; UDP; STUN; Shared secret (as configured in eturnal.yml)
2.) Host IP; 3478; Description; TCP; STUN; Shared secret (as configured in eturnal.yml)
3.) Host IP; 3478; Description; UDP; TURN; Shared secret (as configured in eturnal.yml)
4.) Host IP; 3478; Description; TCP; TURN; Shared secret (as configured in eturnal.yml)

Broadly speaking these are the steps that finally did the trick for me. I hope this little how-to saves someone a lot of time and hassle.

2 Likes