Multiple API Issues: CallHistoryView Stuck on Old Data, and Null attached_data in WebSocket

faveo

Customer
Joined
Oct 28, 2025
Messages
2
Reaction score
3
Version: Enterprise 8SC v20.0
We are in the process of integrating our application with the 3CX API and have run into several critical issues.

We have successfully set up an API user (Service Principal) in the Admin Console and are able to get a Bearer token successfully.

Using the token, some endpoints work correctly:
GET /xapi/v1/Recordings successfully returns recent recordings.
GET /callcontrol/ successfully returns active call information when a call is connected.

However, we are facing the following blocking issues:
CallHistoryView API Returns Only Old Data

GET /xapi/v1/CallHistoryView?$orderby=SegmentId desc&$top=10 endpoint is not returning recent call logs.
We get 200 OK response, but the most recent data returned is from June 27, 2025. Not return any latest record. Why is the CallHistoryView API stuck on old data from June 2025, while the UI and Recordings API are up-to-date?

Also we enabled Call Data Records (CDR)

WebSocket attached_data is Always null
We are connected to the Call Control WebSocket (wss://3CXFQDN/callcontrol/ws). We receive events (like event types 0 and 1) , but the attached_data field in the response is always null. We are unsure about the meaning of event types 0 and 1.

1762150393425.png

CRM Integration Not Working
We attempted to use the server-side CRM integration by creating an XML template and uploading it. We have tried authenticating with a Personal Access Token, Username/Password, and Bearer Token, but Nothing works as expected.
 
Hello

You have here 3 questions:
A) /xapi/v1/CallHistoryView nog working correct (old data)
B) Call Control WebSocket not responding as expected
C) Creating own CRM nog working as expected

I would like to responde to part (A), in 3CX V20 there has been a change (i do think it was V20 Release 6) , where the data moved from database table, and also api request.
You could try to use this: /xapi/v1/ReportCallLogData/Pbx.GetCallLogData

Part (B), is for Call Control, that is another API, and where I have no knowledge.
Part (C), is again total differend ball game, please provide XML or more details as what you are trying to connect ?

Paulo
 
Hello

You have here 3 questions:
A) /xapi/v1/CallHistoryView nog working correct (old data)
B) Call Control WebSocket not responding as expected
C) Creating own CRM nog working as expected

I would like to responde to part (A), in 3CX V20 there has been a change (i do think it was V20 Release 6) , where the data moved from database table, and also api request.
You could try to use this: /xapi/v1/ReportCallLogData/Pbx.GetCallLogData

Part (B), is for Call Control, that is another API, and where I have no knowledge.
Part (C), is again total differend ball game, please provide XML or more details as what you are trying to connect ?

Paulo
Tried the below and it worked, Thanks!

https://3CXFQDN/xapi/v1/ReportCallLogData/Pbx.GetCallLogData(periodFrom=2025-10-01T00:00:00Z,periodTo=2025-11-03T23:59:59Z,sourceType=0,sourceFilter='',destinationType=0,destinationFilter='',callsType=1,callTimeFilterType=0,callTimeFilterFrom='0:00:0',callTimeFilterTo='0:00:0',hidePcalls=true)?$top=100&$skip=0&$orderby=SegmentId desc

Reference: https://github.com/luxzg/3CX-XAPI_examples
 

Members Online Now

No members online now.

Forum statistics

Threads
111,843
Messages
589,327
Members
164,679
Latest member
SamadMYK