VitXi WebRTC 4.0.4-1. The connection to your server could not be established

WebRTC gives this error: “The connection to your server could not be established. Please, contact the administrator.” Usually the device registers and you can also make and receive calls despite the error message. WebRTC with VitalPBX 3 worked well on the same server, now with VitalPBX 4 this problem. I have tried another server in a different data center, it has the same problem. I have tried different hostnames and different certificates (ZeroSSL and Let’s Encrypt) and do not get certificate error messages. Port 8089 is reachable with https. Disabling the firewall doesn’t help either. I run vitalpbx --check-integrity and vitalpbx --build-db without issues. In the network settings I checked the hostname. I have tried different computers, browsers and operating systems. I have used the out dated manual on the wiki for VitXi WebRTC V3, but with V4 there is no “Enable Websocket” for SIP (only uses PJSIP). I want to migrate multiple servers from VitalPBX 3 to VitalPBX 4, but first WebRTC must work properly. I’m out of ideas, what else can I try?

Distro Debian GNU/Linux 11 (bullseye)
PBX Engine 18.20.0
VitalPBX 4.0.6-3
PHP Version 8.1.11
VitXi WebRTC 4.0.4-1

1 Like

Please verify that port 6001 is enabled in VitalPBX and in any firewall you have active

Then, run the following commands:

vitalpbx apply-firewall
/usr/share/vitxi/backend/artisan websockets:ssl-config
systemctl restart vitxi

After that, reload the app by pressing Ctrl+F5 or Ctrl + Shift + R

Thanks, but it didn’t help.
I Also tried in WebRTC troubleshooting Reset App Data.
netstat -tulpn | grep LISTEN | grep 6001
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 83940/php
It is not a firewall problem, tried from multiple locations and computers.
Also with the firewall turned off in VitalPBX the problem stays.
The VitalPBX server is not behind NAT (VitalPBX V3 on the same server did not had problems with WebRTC).

Hello,

After running the command:

/usr/share/vitxi/backend/artisan websockets:ssl-config

What message did it display?

Also, could you please check with systemctl status vitxi to ensure that the service is running correctly?

Regards,

/usr/share/vitxi/backend/artisan websockets:ssl-config
SSL configuration updated successfully!

systemctl status vitxi
● vitxi.service - VitXi Websocket Service
Loaded: loaded (/lib/systemd/system/vitxi.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-12-20 22:00:49 CET; 35min ago
Main PID: 83940 (php)
Tasks: 1 (limit: 38293)
Memory: 34.8M
CPU: 530ms
CGroup: /system.slice/vitxi.service
└─83940 /usr/bin/php /usr/share/vitxi/backend/artisan websockets:serve

Dec 20 22:00:49 xxxxxxxxxxxx.nl systemd[1]: Started VitXi Websocket Service.
Dec 20 22:00:49 xxxxxxxxxxxx.nl php[83940]: Starting the WebSocket server on port 6001…

1 Like

Hello,

OK, the service is running correctly. Sometimes an external firewall (usually on the VPS/hosting) may be blocking the port. If there is another firewall, could you please check if port 6001 is enabled?

Additionally, please try running the following commands:

firewall-cmd --permanent --zone=public --add-port=6001/tcp
firewall-cmd --reload

Afterward, reload Vitxi and check if the issue persists.

Still the same.
From my computer:
nc -zvw10 190.2.151.47 6001
Connection to 190.2.151.47 6001 port [tcp/x11-1] succeeded!

1 Like

We would need to review the issue in detail. In case you don’t have an active subscription, I recommend purchasing one of our support packages to provide you with remote assistance:

We have multiple Carrier Plus licenses from vitalpbx.com.
The account we are using for vitalpbx.com is not recognized by helpdesk.vitalpbx.com.
FORGOT PASSWORD does not send an email.
How do we get access to open a support ticket?

1 Like

You can send us an email at sales@vitalpbx.com requesting the creation of the account

Thanks for solving the problem.
For people with the same problem:
In /usr/share/vitxi/backend/.env the websockets certificates were set incorrectly.
After changing them manually, you have to run “systemctl restart vitxi” and reload the browser (Ctrl+F5).
Whatsout for “/usr/share/vitxi/backend/artisan websockets:ssl-config”, which restored the wrong certificates.

3 Likes

hi can you please elaborate a little more I am having the same issue.
which specific filed I need to change in the file you mentioned

1 Like

Hello,

Please ensure that port 6001 is enabled on all active firewalls and that you have the latest version of VitXi installed (4.1.0-0).

Then, run the following commands:

cd /usr/share/vitxi/backend/
php artisan logs:clear
php artisan websockets:ssl-config
systemctl restart vitxi
systemctl restart vitxi-worker

Best regards,

2 Likes

got it and it worked