WebSocket event bug?

Mora

Customer
Joined
Apr 12, 2022
Messages
49
Reaction score
5
I'm listening to "wss://{{fqdn}}/callcontrol/ws", so far so good.

The flow I'm testing is this...
  1. 101 calls 138
  2. 138 blind transfer call to 139
  3. 139 answers
  4. After some seconds 101 hangs up

Here's the WebSocket events I receive...

1740556642483.png

Each time I get an event, I get the participant like "/callcontrol/101/participants/1453", so the flow looks like this:

1740556712956.png

My biggest problem is, that I don't get a "Disconnected" (event_type 1) when 138 blind transfer call to 139.

Is that a bug?

Also why is "attached_data" always null? Would love if "attached_data" actually contained the participants info.

Thanks.

UPDATE:
If I remove myself (101) from the queue, then I receive no WebSocket events when ringing to that queue at all? Strange.

UPDATE:
I see it works fine for all other queues but this single queue. All other queues has events with multiple Dns - this particular queue only have mine (101) Dn - it doesn't receive events from other participants.

UPDATE:
If I put a regular user into this queue, then I get events on his Dn also, so it must be a problem with the two test users I have in this test queue. Both test users are logged in and receive calls when I call the queue - and I can't see they are set up any different that the regular user. Any idea?
 
Last edited:
Hello,

Please share how to authenticate to the websocket to listen to the events.
 
  • Like
Reactions: Ecki
Hello,

Please share how to authenticate to the websocket to listen to the events.

Hi xcobean,

in my environment the authentication worked via the Authorization: Bearer ACCESS_TOKEN

The full request looks like this (URL: wss://<FQDN>:441/callcontrol/ws):

HTTP:
GET /callcontrol/ws HTTP/1.1
sec-websocket-extensions: permessag-deflate; client_max_window_bits
connection: upgrade
authorization: Bearer <ACCESS_TOKEN>
host: <FQDN>
cache-control: no-cache
sec-websocket-version: 13
sec-websocket-key: eVpwVzl3ZWExbjdhR2VYNg==
upgrade: websocket
origin: https://<FQDN>:443
content-type: application/text
accept: */*
user-agent: <YOUR USER-AGENT>

The response from the 3CX Server:

HTTP:
HTTP/1.1 101 Switching Protocols
Server: nginx
Date: Fri, 09 May 2025 08:31:56 GMT
Connection: upgrade
Upgrade: websocket
X-3CX-Version: 20.0.4.487
Sec-WebSocket-Accept: AiWPpjIUfCsNPsZ5jRZlADfG1dQ=
Strict-Transport-Security: max-age=31536000
 
I'm listening to "wss://{{fqdn}}/callcontrol/ws", so far so good.

[...]

Also why is "attached_data" always null? Would love if "attached_data" actually contained the participants info.

[...]

Did you ever get any further progress for the "attached_data"?

Is it required that the client fetches additional data via the event.entity path? What's the required format for these WebSocketRequests?

I have tried sending the following request, which did not work:
JSON:
{
    "RequestID": "123",
    "Path": "/callcontrol/{dn}/participants/<id>",
    "RequestData": ""
}
 

Latest Posts

Forum statistics

Threads
111,973
Messages
590,075
Members
164,895
Latest member
jasonkkrause