New struct database postgresql version 20

JC HELP

Premier Customer
Joined
Sep 12, 2025
Messages
2
Reaction score
0
After migrating to 3cx version 20, I noticed that the postgrsql database recording tables were changed and are no longer recording data, for example in cl_segments_view. How can I get information about where the data that was recorded in this table is being recorded now? Can anyone help me?
 
Hello,

We do not encourage you to access the Database directly, but if you the check Blog posts for v20 update 6 you will find information on a major DB update that helps with system performance and stability.
 
Starting with 3CX v20 U6, the new table containing the information of the calls is cdroutput. However as @KyriacosS_3CX mentioned, it's not recommended that you access the 3CX database directly.
 
  • Like
Reactions: Evolute IT
I don't access the database directly. I have a 3CX server on an EC2 server in São Paulo. I wrote a script that dumps the PostgreSQL database every night and sends it to an RDS server. From there, the data team builds dashboards based on the metrics our support team needs. In V20, we're missing data from these views: cl_segments_view.src_dn_type = 1
cl_segments_view.dst_dn_type = 6
cl_segments_view.seg_order = 1

Can you tell me where I can get this information or how it's constructed in V20?
 
Perhaps if you take a look to the 3CX dashboards available on the Grafana Marketplace and the queries those are using, you might find the info you need.
 
Those tables are not filled anymore since U6, you will need to completely re-write this, the structure changed completely. Now everything is in a single table instead of those 4 CL_* tables. You should use the database exporting feature to take that information out.
 
Let's be real here for a moment -- the fact that you are using a script to access the PostgreSQL database means you absolutely are accessing the database quite directly. People are being polite today, but I can tell you that 3CX Support will not be pleased that you are accessing the database, and you could get your PBX flagged as unsupported. If you are going to do it anyway, then I suggest you not mention it publicly.

As others have mentioned, the only supported way to get access to the underlying database tables is either via the original CDR files 3CX can automatically generate for each call, or via the new Grafana integration. Start there and see if either of these two sources are sufficient.

As mentioned above, all the tables with names that begin with "cl_ " are no longer used.
 
I don't access the database directly. I have a 3CX server on an EC2 server in São Paulo. I wrote a script that dumps the PostgreSQL database every night and sends it to an RDS server. From there, the data team builds dashboards based on the metrics our support team needs. In V20, we're missing data from these views: cl_segments_view.src_dn_type = 1
cl_segments_view.dst_dn_type = 6
cl_segments_view.seg_order = 1

Can you tell me where I can get this information or how it's constructed in V20?
You don't need to do this anymore. The data gets sent in a much improved format and in an organized and fully supported way to either PowerBI or Grafana and from there you can build your own dashboards using the samples that we provide as a starting point. You can also specify the schedule and in update 8 it will be every 15 minutes if you like. It will also optionally automatically purge data on the PBX to keep your database compact and fast.
 
This may sound pretty naive but Ill really appreciate some insight please on how to use the public.recordings table in the data integration. I notice there is a column recording_url, but im at a loss on the best way to present this on my dashboard (i.e. Write a query to cross reference the cdr_id and present/generate a hyperlink for the recording file)
 
Hello,

It's easy to make our Grafana dashboards editable and look at how our Queries do it. See attached.

Hope this helps.
 

Attachments

@KyriacosS_3CX, thanks a lot for the sample query.

My objective is not to access recordings directly through 3CX authentication, but rather to expose a valid, clickable download link in Grafana and/or my CRM for supervisors, without requiring login to the 3CX console.

The intended architecture is as follows:
  • 3CX continues to handle call management and recording generation
  • Recordings are archived externally after 7 days (i.e. Microsoft 365 / SharePoint)
  • Grafana consumes recording metadata from the database and renders a direct download/playback URL
This approach allows supervisors to review recordings directly from Grafana while keeping 3CX focused on its core PBX responsibilities, rather than reporting or media delivery.

To proceed cleanly, I would like to confirm:
  1. Whether 3CX supports generating or exposing direct (or pre-signed) URLs for for both local and archived recordings
  2. Or alternatively, whether the recommended approach is to resolve the recording path externally ONLY using metadata available in the database as recording_url / cdr_id

Thank you.
 
Hi,

If you know your base URL for the external archive, you can pull the /path/filename.wav from Grafana and create a link on the fly for downloading/listening.
You could similarly create direct links for the ones on the PBX utilising the info in the exported DB to build them, and provide a unified interface, switching the URL construction based an archiving status. Any user accessing these would need to be logged in to the relevant systems and had the proper permissions - so for the ones still on the PBX it would need to be an appropriate PBX account.
 
  • Like
Reactions: Evolute IT
Once again, thank you so much for taking out time to respond.

I guess the part thats pretty elusive to me, is the base URL to use when accessing the recordings on the PBX. The recording_url exposed in the Database is as this: "10000/[Ad*******ya]_10000-070*******0_20250711125945(117183).wav"
 
Tha is the path within your export folder - If you are exporting to [Exports/Recordings/] the file will be at [Exports/Recordings/10000/[Ad*******ya]_10000-070*******0_20250711125945(117183).wav]
 

Forum statistics

Threads
111,953
Messages
589,914
Members
164,849
Latest member
BillyAkansel