Sonata Dialer Agent Login (The connection to the server has failed.)

@zahid
What are your changes?
Did you use the default port 443?

Yes i did setup as default and it is working
The time zone was UTC i did change it to New York and now i am able to make test calls

Yes it is working when using default port.

I will wait for @maynor for their checking regarding the custom port. Really need this as it adds additional security not only for Sonata Dialer as well as other add ons or things that uses HTTPS.

1 Like

Yes absolutely
And i think it is possible through (NGNIX) we can map custom ports External to internal as Sonata apps are running virtual hosts
During troubleshoot i found Sonata dialer listening on 6002 port as virtual host

Any updates on this @maynor still no updates?

1 Like

Hello!

Sorry for the delay in the response, the new version of S. Dialer is available!: Sonata Dialer – Versions 4.5.0-3 & 4.0.2-2

Please proceed with the update,

Regards,

Hi everyone,

Had the same issue of a fresh Sonata (4.5.0-5) on a 4.5.1 R6 VitalPBX release
But same issue happend after upgrade to 4.5.2 R1

I wanted to share what finally fixed this issue for me. While this might not be the exact same issue the OP is facing, I’m hoping my experience helps someone else who finds this thread while troubleshooting.

In my case, I was using a standard setup (default port 443, no custom HTTPS ports) and had my SSL certificates correctly configured. Despite the UI looking correct, the Agent Portal would consistently show “The connection to the server has failed.”

What was wrong: Even though the add-on was installed, the background services and “workers” that handle the connection were not running or enabled by default. Because these services were “dead” (inactive), the browser couldn’t establish the WebSocket handshake.

The Fix (via CLI): You’ll need to log in to your PBX via SSH as root and run these commands to bring the backend to life:

  1. Fix permissions and clear old logs: dialer app:fix-permissions dialer logs:clear
  2. Enable and start the services: (Note: VitalPBX 4 uses instanced workers, so you need to enable them specifically). systemctl enable --now sonata-dialer systemctl enable --now sonata-dialer-worker@1 systemctl enable --now sonata-dialer-worker@2 systemctl enable --now sonata-dialer-worker@3
  3. Verify they are running: systemctl status sonata-dialer systemctl status sonata-dialer-worker@1

Settings to check in the Web UI: Under Sonata Dialer > Settings > PBX Settings:

  • Host: Ensure this matches your FQDN (e.g., pbx.yourdomain.com) and NOT localhost if you are using SSL.
  • Port: 443
  • Secure: Checked
  • WSS Port: 8089

Once those services were started, the Agent Portal immediately connected without further changes.

A note for the VitalPBX team: It seems that on some fresh installs of VitalPBX 4, these services don’t always start or enable themselves automatically. It might be worth looking into the installation script to ensure these workers are triggered by default so users don’t have to manually intervene in the CLI.