Unable to start calls

It’s unable to start voice call from web version as well from any mobile client

Steps to reproduce
I’m using self-hosted version on hetzner VPS server, no docker involved

Mattermost Version: 7.10.2
Database Schema Version: 108
Database: postgres

Observed behavior

when I’m trying to start call from web version it results in infinite “connecting to the call message”

and there is an error in logs:

  "caller": "app/plugin_api.go:976",
  "level": "error",
  "msg": "callback failed: call state is missing from channel state",
  "origin": "main.(*Plugin).handleLeave websocket.go:454",
  "plugin_id": "com.mattermost.calls",
  "timestamp": "2023-06-29 13:09:26.987 Z"

if I’ll try from mobile app - “timed out waiting for peer connection”

with two errors going together:

  "caller": "web/context.go:115",
  "err_where": "",
  "error": ": api endpoint requires a license",
  "http_code": 501,
  "ip_addr": "XXX.XXX.XXX.XXX",
  "level": "info",
  "method": "GET",
  "msg": "api endpoint requires a license",
  "path": "/api/v4/users/1qgj5f6ieif69m884ymirxjbgh/groups",
  "request_id": "d8wz3p9uu3rhig3w4yq9ymar6e",
  "timestamp": "2023-06-29 13:10:31.984 Z",
  "user_id": "1qgj5f6ieif69m884ymirxjbgh"

and then

  "caller": "app/plugin_api.go:976",
  "level": "error",
  "msg": "callback failed: call state is missing from channel state",
  "origin": "main.(*Plugin).handleLeave websocket.go:454",
  "plugin_id": "com.mattermost.calls",
  "timestamp": "2023-06-29 13:10:42.664 Z"
 ss -ntlup | grep  '8443'
udp   UNCONN 0      0        <local_IP1>:8443*    users:(("plugin-linux-am",pid=31649,fd=20))
udp   UNCONN 0      0         <local_IP1>:8443*    users:(("plugin-linux-am",pid=31649,fd=17))
udp   UNCONN 0      0         <local_IP2>:8443*    users:(("plugin-linux-am",pid=31649,fd=18))
udp   UNCONN 0      0         <local_IP2>:8443*    users:(("plugin-linux-am",pid=31649,fd=15))
udp   UNCONN 0      0       <public_IP>:8443*    users:(("plugin-linux-am",pid=31649,fd=16))
udp   UNCONN 0      0      <public_IP>:8443*    users:(("plugin-linux-am",pid=31649,fd=13))
udp   UNCONN 0      0 *    users:(("plugin-linux-am",pid=31649,fd=14))
udp   UNCONN 0      0 *    users:(("plugin-linux-am",pid=31649,fd=12))

the same from lsof command

lsof -n -i :8443 | grep -v "COMMAND" | wc -l
iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

in addition:

 ps ax | grep calls
  31649 ?        Sl     0:02 plugins/com.mattermost.calls/server/dist/plugin-linux-amd64
/opt/mattermost/bin/mmctl --local config get PluginSettings.Plugins.com.mattermost.calls
  "allowscreensharing": true,
  "defaultenabled": true,
  "enablerecordings": false,
  "enablesimulcast": false,
  "icehostoverride": "<public_IP>",
  "iceserversconfigs": "",
  "jobserviceurl": null,
  "maxcallparticipants": 0,
  "maxrecordingduration": 60,
  "recordingquality": "medium",
  "rtcdserviceurl": null,
  "serversideturn": true,
  "turncredentialsexpirationminutes": 1436,
  "turnstaticauthsecret": "",
  "udpserveraddress": "<public_IP>",
  "udpserverport": 8443

Could you please help with further diagnostics?

thank you in advance,

Hi Pavlos and welcome to the Mattermost forums!

Is there any firewall in front of your Hetzner VPS? Something that maybe blocks incoming UDP traffic? You need to verify that you can connect from a client to your server on UDP port 8443. You can do that using the nc command line utility f.ex.
To do that, stop the calls plugin, the local port 8443 on your Hetzner VPS should be unoccupied again.
On the VPS, run the following command:

nc -l -u -p 8443 

On a client, run:

nc -u <public_IP> 8443

You can then start typing in any of the two commands and the text should appear on both ends when you hit return. If it does not, your connection does not work which will also explain the behaviour you’re experiencing here.

Hi Alexander! Thanks a lot for your reply.

I checked the UDP port and it works good

What else can I check?

Good question… @streamer45 any ideas what else to check?

@supe Is your VPS public IP address directly assigned to a local interface? I am asking because in the config above you are storing it in the udpserveraddress config setting. Usually you would leave that either blank to listen on all available interface or set it to a specific local IP/interface.

Hi Claudio @streamer45 !
Thanks for the reply.

I have Public IP directly attached as eth0 network interface

I left empty field udpserveraddress and restarted MM server, but nothing changed , still have the same couple of errorrs for mobile clients and one line for the browser one

Okay, those errors are unrelated with the connectivity issue. Server side it seems well configured. Did you perform the netcat checks from one of those clients unable to connect?

Yes, I did it from one of that clients. And I haven’t any which can make a call.

Alright. To remove any doubts on the client side I’d suggest to create an account on our Community server and see if any of these clients are able to successfully connect to calls.