Summary: Configure support for audio/video calls with Prosody,
Category: instant messaging
Status: published
Status: draft
[TOC]
Introduction
---
This is a guide to set up server-side support for audio/video calls over XMPP. To do this we will first install and configure [Coturn](https://github.com/coturn/coturn). It is a libre STUN/TURN server that helps establish peer connections across firewalls for media streams such as calls. Additionally we will configure Prosody to talk to `coturn`.
In april 2020 Conversations released support for end-to-end encrypted audio/video calls. For it to work you need to enable server-side support, this guide will help you set that up.
We will first install and configure [Coturn](https://github.com/coturn/coturn). It is a libre STUN/TURN server that helps establish peer connections across firewalls for media streams such as calls. Then we will configure Prosody to talk to Coturn.
Like the other guides, this one assumes Debian stable running on the server, the fact that you will end up hosting a few of your friends and that you have some basic skills working on a linux command line.
@ -28,7 +30,7 @@ To make your server communicate make sure following ports are open in your firew
5349 (TURN + TLS)
49152-65535 (UDP endpoints for clients)
Set up coturn
Set up Coturn
---
First install Coturn
@ -50,7 +52,7 @@ Then download the configuration by [the homebrewserver.club](https://homebrewser
The file looks like this:
:::console
:::c
## Minimal version of /etc/tunserver.conf
## For more options and info see the original /etc/turnserver.conf.bak
@ -61,6 +63,9 @@ The file looks like this:
# Your external IP, needed for some connections
listening-ip=CUSTOMIZE THIS
# Your domain name
realm=myserver.org
# Ports that client can connect to. Again make sure they are open for UDP connections on your firewall
min-port=49152
max-port=65535
@ -89,6 +94,8 @@ First, add your external IP-address to `listening-ip`. If you don't know it, you
:::console
$ curl https://ifconfig.co
After that make sure `realm` points to the domain name of the server.
Then, set `static-auth-secret` to a decently long passphrase. You can also generate one with:
:::console
@ -121,10 +128,10 @@ First add `turncredentials` to the `modules_enabled` section.
Then, before the 'Virtual Hosts' section add:
:::console
turncredentials_host = "localhost"
turncredentials_host = "myserver.org"
turncredentials_secret="mydecentlylongpassphrase"
And replace the value of `turncredentials_secret` with the value of `static-auth-secret` in `/etc/turnserver.conf`
And replace the value of `turncredentials_secret` with the value of `static-auth-secret` in `/etc/turnserver.conf` and `turncredentials_host` with your domain name.