Unable to Link 3CX Call Control API Events with Call Recordings

HemanthPidugu

SMB User
Joined
Oct 10, 2025
Messages
6
Reaction score
0
I’m currently using the 3CX Call Control API WebSocket to listen for call events, and we store the participant details in our participant table when a call is connected.
We also receive all call recordings via FTP, which are saved into the cdroutput and cdrrecordings tables in our database.


However, none of the fields in these tables match the data we receive from the Call Control API — there is no callid or any other identifier that allows us to link a recording to the corresponding call event.


So the issue is: how can we relate a call to its recording when there is no common identifier between the API data and the CDR tables?
 
The websocket events are not linked to the CDR output at all. It's real-time events of the active connection. You simply cannot link them directly. You will have to try and detect based on caller ID, timestamp and such.

The CRM integration can do it for you by sending it all at once... that's should be your way to go.
 
@ConceptsWeb Thanks for replying

There is no caller ID in the CDR output we receive.


Our goal is to link each user (based on their extension) with the corresponding CDR data so we can display all of their call recordings in our application. Every user in our system has a unique extension and they make calls to external numbers. Since all calls are recorded, we need a way to retrieve and show all recordings for a specific user.


To achieve this, we started listening to the live WebSocket events from the Call Control API and storing the call details (including extension and call ID) in our database. However, the CDR output we receive via FTP does not contain any of the identifiers we get from the WebSocket — so there is no common field to match the two.


Given this limitation, is it possible to accomplish this using a CRM template?
 
@ConceptsWeb Thanks for replying

There is no caller ID in the CDR output we receive.


Our goal is to link each user (based on their extension) with the corresponding CDR data so we can display all of their call recordings in our application. Every user in our system has a unique extension and they make calls to external numbers. Since all calls are recorded, we need a way to retrieve and show all recordings for a specific user.


To achieve this, we started listening to the live WebSocket events from the Call Control API and storing the call details (including extension and call ID) in our database. However, the CDR output we receive via FTP does not contain any of the identifiers we get from the WebSocket — so there is no common field to match the two.


Given this limitation, is it possible to accomplish this using a CRM template?
The CRM integration is the best for this. It will provide you with call direction, duration, agent extension, caller/callee number, recording URL and more. You just need an endpoint to receive the data and download the recording file to your own platform via that provided link. It's a direct link to the file, whatever storage it is in.

Specifically the ReportCall scenario that you want to use.

We'd be happy to help if needed. We know those templates very well.
 
@ConceptsWeb
<?xml version="1.0"?>
<Crm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Country="US" Name="Sample" Version="1" SupportsEmojis="true">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="2" />

<!-- ✅ Trigger only on CallAnswered -->
<Triggers>
<Trigger Name="CallAnswered" Scenario="ReportCall" />
</Triggers>

<Parameters>
<Parameter Name="UserName" Type="String" Parent="General Configuration" Editor="String" Title="Username:" />
<Parameter Name="Password" Type="Password" Parent="General Configuration" Editor="String" Title="Password:" />
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="True" />
<Parameter Name="Subject" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Call Subject:" Default="3CX PhoneSystem Call" />
<Parameter Name="InboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Inbound Call:" Default="[DateTime]: Answered incoming call from [Number] to [Agent] ([Duration])" />
<Parameter Name="MissedCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Missed Call:" Default="[DateTime]: Missed call from [Number] to [Agent]" />
<Parameter Name="OutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Outbound Call:" Default="[DateTime]: Answered outgoing call from [Agent] to [Number] ([Duration])" />
<Parameter Name="NotAnsweredOutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Unanswered Outbound Call:" Default="[DateTime]: Unanswered outgoing call from [Agent] to [Number]" />
</Parameters>

<Authentication Type="Basic">
<Value>[UserName]:[Password]</Value>
</Authentication>

<Scenarios>
<!-- ✅ Journaling Scenario: Triggered only on CallAnswered -->
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,False)]"
Url="https://webhook.site/03c9e69e-421e-4b82-a477-7fdac723c6d4"
MessagePasses="0"
RequestContentType="application/json"
RequestEncoding="Json"
RequestType="Post"
ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Type="String">[Duration]</Value>
<Value Key="phone" Type="String">[Number]</Value>
<Value Key="type" Type="String">[CallType]</Value>
<Value Key="direction" Type="String">[CallDirection]</Value>
<Value Key="agent" Type="String">[Agent]</Value>
<Value Key="agentLastName" Type="String">[AgentLastName]</Value>
<Value Key="agentFirstName" Type="String">[AgentFirstName]</Value>
<Value Key="agentEmail" Type="String">[AgentEmail]</Value>
<Value Key="entityId" Type="String">[EntityId]</Value>
<Value Key="subject" Type="String">[Subject]</Value>
<Value Key="description" Type="String">[IIf([CallType]==Inbound,[InboundCallText],[OutboundCallText])]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
</Scenarios>
</Crm>
I tried something like this I am receiving the request on call disconnected after answering
{
"duration": "00:08",
"phone": "XXXXXXXXXXX",
"type": "Inbound",
"direction": "Inbound",
"agent": "1002",
"agentLastName": "Pidugu",
"agentFirstName": "Hemanth",
"agentEmail": "[email protected]",
"entityId": "",
"subject": "3CX PhoneSystem Call",
"description": "[DateTime]: Answered incoming call from [Number] to [Agent] ([Duration])"
}
is there a field to get the recording url I am recording all the calls
 
[RecordingUrl]

[Transcription]

[Summary]

Send that to whatever post value you want.
 
@ConceptsWeb I tried RecordingUrl already but it doesn’t send any value
 
@ConceptsWeb and is there a way to trigger the same kind of logic on call answered the current one only gets triggered once the call is answered and disconnected
 
@ConceptsWeb I tried RecordingUrl already but it doesn’t send any value
Call recording must be enabled on the user and the call must have been recorded. So it has to go through an extension. Otherwise it will be empty.

@ConceptsWeb and is there a way to trigger the same kind of logic on call answered the current one only gets triggered once the call is answered and disconnected
No this is not possible. The CRM integration only triggers at the end of a call since that is when we have all the data to post.
 
  • Like
Reactions: paulodagraca
I’m currently using the 3CX Call Control API WebSocket to listen for call events, and we store the participant details in our participant table when a call is connected.
We also receive all call recordings via FTP, which are saved into the cdroutput and cdrrecordings tables in our database.


However, none of the fields in these tables match the data we receive from the Call Control API — there is no callid or any other identifier that allows us to link a recording to the corresponding call event.


So the issue is: how can we relate a call to its recording when there is no common identifier between the API data and the CDR tables?
pay attention to the third-party development. maybe this will help you

https://creomate.com/3cx-crm-bundle
 
@ConceptsWeb Is there a document that is available to see all the available parameters that we can retrieve

I see an option for chat Journaling is there a way to get the transcription of the chat as well ?
 

Members Online Now

Forum statistics

Threads
111,831
Messages
589,277
Members
164,660
Latest member
RJenkinsROCK