Solved Log incoming calss as soon as the phone is picked

Status
Not open for further replies.

EDiMaio

New User
Joined
May 19, 2021
Messages
11
Reaction score
1
Hi,
I'm currently developing a Windows tool which is going to report the different calls received on my 3cx internal network. Getting information like call start/end time, caller number and receiver number, etc. is quite simple thanks to the 3cx CDR which actually logs this kind of information in a text file. However, I noticed that the data are logged only once the call is ended by one of the users. Is there anyway to get - for example - the caller number before the connection is dropped? I would need to get the caller data as soon as the receiver picks the phone. Is this kind of information even logged in the 3cx postgres db? Or do I always have to wait for the telephone call to be ended?
Thank you very much.
 
Hi @EDiMaio,

The CDR log is only accessed once per call, at the end of the call as you noted.

Yes that info would exist in the postgres database, HOWEVER I MUST WARN YOU THAT ACCESSING THE POSTGRES DB IS NOT ADVISED as this will void 3CX Support for the 3CX Instance in question.
 
Hi @VasilisV_3CX ,
Thank you very much for your answer. Giving that it would not be legit to manually access to the db, is there any way I can somehow fetch the call data the moment the phone is picked? I would need my .net application to notify the user that a certain person has called without waiting for the call itself to be ended.
Thank you again.
 
Hi @EDiMaio,

This may be handled by a 3rd party application using the Call Control API, which one of our partners may be able to assist you with @VoIPTools.
 
Hi again @VasilisV_3CX ,
I thought the Call Control API were deprecated, am I mistaken? Is there anyway I can program my own 3rd party application with these APIs, or some kind of sdk kit? Is there any documentation about it?
Thank you
 
Hi EDiMaio,

It is true that 3CX has withdrawn the documentation for the 3CX Call Control API. However, the API is still there, and 3CX still uses this API for its own purposes. I do not think this API is going anywhere soon (it is also in 3CX V18).

However, 3CX has announced a new REST API and Gateway service that should be the supported way of communicating with 3CX starting with V18. I suspect this is one of the reasons why the documentation for the 3CX Call Control API was withdrawn. We do not have any information about what will be possible with these new tools, so I can not say for sure that we will be able to subscribe to call events, but I certainly hope this will be possible.

In the meantime, we at VoIPTools have developed our own REST / Events API that makes it possible for your .Net applications to subscribe to call events using SignalR. Our API is part of our VoIPTools Relay. We provide full documentation, .Net client DLL to hide the complexities of working with SignalR, and a Visual Studio sample project you can use as a template for your application.

I do not know the urgency of your project, but my recommendation is to wait and see what 3CX provides with the new APIs. We do not have an ETA for when the new APIs will be available, but I heard a rumor that it may not be released until SP1 or SP2 of V18. My educated guess (it is only a guess) is around the December time frame.

There are some other options I should mention. You could build a server-side CRM integration that pushes events to your application (technically, your application does not have to be a CRM, it just has to support the necessary REST APIs).

Or, you could have either the web or Windows client call an external application and pass the phone number and caller name to the application, but this does require configuration on every PC.

There are several ways to get the call events. The server-side approaches are more challenging, but you only have to do it once. The client-side approach is far easier, but you have to set it up on every PC.
 
Hi @VoIPTools ,
Thank you for your detailed explanation. I'll take a look at VoIPTools services and decide what's best for my project.
Have a nice day!
 
  • Like
Reactions: VasilisV_3CX
If you require any further assistance, feel free to open a new thread. Have a great day @EDiMaio!
 
Status
Not open for further replies.

Forum statistics

Threads
111,974
Messages
590,081
Members
164,899
Latest member
mazet