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

Get active calls & Understanding 3CXDialer.log

Status
Not open for further replies.

bugfix

Joined
Feb 10, 2017
Messages
9
Reaction score
2
Hello,

we are a big company and wand to/have to integrate the 3CX to our systems.
Since there is no (state of the art) (REST-)API I wanted to ask if there is any chance of getting the infos abour active (ringing) callers out of the system.
We found out that it is not possible via PostgreSQL because the insert-querys are made after hangup.

So we now have to use the "3CXDialer.log" and parse the results.
Can you give me some details of the columns used?

Code:
17.02.10 13:51:50.066|200002| Trc|75|0009|: Ins: Call(7) [Dialing] DN=10001 IP=10001 EP=066412345
Attached: [sip_displayname=+4366412345;lookup_displayname=;inbound_did=+43000666;inbound_did_rule=;chid=0000015A281466B1_7;prevCalcontact=sip:[email protected].***.at:5060;caller_name=+4366412345]

1: Date
2: this is sometimes 200002, 200003 or 100018 - what is this?
3: Trc or Inf -> it seems that I have to parse only Trc for the callers
4: 50 or 75 - what is this?
5: this is sometimes 0009, 0013, 0010, 0012, 0014 - what is this?
6: Here are the detailed infos.

Details seems to be DBG (I think I can ignore them?) and then Ins for Insert, Upd for Update and Del for Delete.
When there is a new call I get some Inserts, when the call is established I get an Update and when the call is ended I get Delete of [Connection] - is this correct?

Any help would by highly appreciated. Thank you!!

Best regards,
Harald
 
Hi,

and to integrate our systems we have to build our own api in this .net application?
We want to access these infos from remote (other systems) - the .net has to run on the pbx-server so we have to write a second api on top of your api to get this done?

Can you give me a short hint on the columns anyway?

Best regards
 
Yes, you need to consume the API locally from the same 3CX server. Then you can expose a REST API for remote access if you want.

I do not recommend parsing the logs. Logs are very likely to change, so any update of the PBX can break your implementation... You better use the API, that's the way to go.
 
Hello. We are using your ISO which is based on Linux and we cannot install .net here, can we?
 
You need to create a .NET CORE program. In Linux 3CX is running .NET CORE, so you can use Visual Studio to create a .NET CORE program and use the API from linux.
 
Are there any Examples or Tutorials for this?

And could You please give me a little hint on the logs? Just in case...

Thanks
 
This article has a lot of samples on how to use the API:
https://www.3cx.com/blog/docs/call-control-api/

Regarding how to create a .NET CORE program, you can google it and you will get lots of tutorials and information.

RE logs, I don't have the information you need, however I strongly discourage using that approach.

Kind regards.
 
Thank you - we will try to do it this way.

But:
Can you get the answer to my question from someone who has this info? I assume someone at 3CX has to know it ;-)
Or don't you want to tell because it's magic?
And of course - I got it that you strongly discourage, recommend not to use and find the API the better way.

Thank you!
 
Of course the dev team has the answer for the logs, but they're very focused on their work and I'm not allowed to ask that kind of questions to them. In any case, if you're going to parse the log, you should concentrate on the part on the right, which contains the call information. I think you should be able to do it without completely understanding the meaning of the numbers on the left...
 
  • Like
Reactions: bugfix
The article you provided is for a 3cx installation running on windows, we are running the application on linux. Therefore you suggested to build an own REST-API againt your call control api as a .net core application. The problem is, there is no sensible way to reference a dll file in a net core application, just if the .ll is packaged in a nuget package. Can you update your article for linux installations or deliver a nuget package with the call control api?

br
 
Hi Harald,
In a .NET CORE program you can still add references to DLLs by browsing from the file system. Just copy the file "3cxpscomcpp2.dll" from your linux server at "/usr/lib/3cxpbx" to your dev machine, and add a reference to that DLL. When you have your program ready, copy it to the same folder "/usr/lib/3cxpbx" and all the references will work.
Kind regards.
 
Hi,
I just tried your solution, and got this error adding a refrence to the 3cxpscomcpp2.dll file to my project: Error.PNG
VisualStudio Version 2015, netcore 1.0.0
As I mentioned in the post above it needs to be in a NuGet package. Have you tried the solution yourself? Is there the possibilty of providing the 3cxpscomcpp2.dll as an NuGet Package?

Best Regards.
 
Hi, I was able do add an .ddl file as reference to the procjet in VS2017 RC. And after compiling it and running on the remote machine in the /usr/lib/3cxbx directory i get following exception:

Unhandled Exception: TCX.Configuration.Exceptions.PhoneSystemException: ConfigServer is not connected
at TCX.Configuration.PhoneSystem.Connect()
at TCX.Configuration.PhoneSystem.get_Root()
at ShowGatewayParametersSample.Run()
at PBXParameters.Program.Main(String[] args)

How can i connect the ConfigServer?
BR
 
Status
Not open for further replies.
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.