• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Save time started and time ended call

Status
Not open for further replies.

Simone Rota

Forum User
Joined
May 29, 2018
Messages
181
Reaction score
5
Hi,
How could I pass to a web service Time started and Time Ended of a Call?

Thanks

Simo
 
Do you mean a call to a CFD app? Or a call to an agent?

If you need to know the talking time between a caller and an agent, then you should use the CDRs generated by 3CX. You can process this information and send it to a web service.
 
I wolud like to save them in my CFD.
A Time Variable before the call... then transfer to an Internal Phone.... then Time Variable at the end.
Connectin to SQL to save them
 
Perhaps the easiest way is to configure 3CX to write a CDR file once the call is disconnected. You can then parse the text file to get the start and end time. Other options are far more complicated which include creating a service that connects to the Call Control API and monitors events, or a CRM plugin.

If I were going to do this, I would use our Exporter tool that automatically processes the CDR files and places the data in SQL or MySQL. You didn't mention whether your needs were real-time or whether this could be done nightly in batch. If real-time, I would create a small service that queries SQL. If batch is acceptable, I would create a Windows scheduled task to get the start / end times and call the web service.
 
Once the call leaves the CFD (call transferred to another extension) you lose visibility regarding when the call ends. So unless the entire duration of the call is within the CFD, you will not be able to get the end time in the CFD application.
 
@Simone Rota,

I wolud like to save them in my CFD.
A Time Variable before the call... then transfer to an Internal Phone.... then Time Variable at the end.
Connectin to SQL to save them
You can't do it like that. The CFD app will lose control of the call as soon as it transfers the call. So you will have the start time, then you transfer the call, and the CFD app finishes.

The way to go here is using CDRs, not the CFD.

Kind regards.
 
As Ernesto and I have mentioned, this probably (depending on the purpose of your CFD) cannot be done in the CFD. I concur with Ernesto that the way to go is to process the CDR files. To do this in real-time you could create a small application that includes a file system watcher service that detects that a new file has been created. This process would parse the CDR file to get the details about the call (including start and end time), and then call the web service.
 
So something like this is not possible?

upload_2018-6-20_17-14-8.png

Where in AssignVariable1 I'm going to save DateTime.Now
Where in AssignVariable2 I'm going to save DateTime.Now (at the end)

And with the DatabaseAccess1 I'll save it in SQL
 
This is not possible. As soon as you transfer (step 2) the call has left the CFD extension and the remainder of the steps will never execute.
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,934
Messages
751,290
Members
145,382
Latest member
norb.p
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.