API ASP.Net get an error with the last version

Status
Not open for further replies.

Alfred Wallace

Forum User
Joined
Oct 13, 2020
Messages
4
Reaction score
0
Hi,

I'm developing an ASP.net API used by a website to call customers through 3CX System. It work good until the last update.
On 25.09 our provider installed the new version of 3CX System with a new version of 3cxpscomcpp2.dll file.

I just wanted to recompile my application and I get always this error. I try a lot of thing but didn't find how to fix that. This error don't come with the old file (I guess V2.0)
Found conflicts between different versions of "System.Net.Http" that could not be resolved.

Also I'm using Visual Studio 2019 with all the latest version of every component.
Actually 3cxpscomcpp2.dll is used as a reference and copied in my published directory every time.

I read that in the documentation:
3CX Phone System Object Model v3.0.0.0 V16
This API (.NET assembly) is the integral part of concrete 3CX PhoneSystem installation it should be referenced and loaded directly from the location of PBX installation. Applications must not use local copy of this assembly and must run in native mode of operation system. Connection information should be taken from 3CXPhoneSystem.ini file located in instance forder(directory).

Is that new in this DLL, should I change the way I load the DLL ? Or should I use a specific version of System.Net.Http ?

Any help will be really great, thanks for your time.

AWZ
 
3CX V16 Update 6 implements .Net Standard 2.1. This version of .Net Standard is NOT compatible with .Net Framework applications. You will need to update your application to .Net Core.
 
Thank you for your answer.

Just another question also, if you have a .NET Framework application who need a user interface to use the DLL what you should do ?

Thank you
 
It is not possible to use the 3CX Call Control API DLL with a .Net Framework application. You will have to rewrite your application as a .Net Core application.

The other option is to expose the methods you need from the Call Control API with your own API (REST API for example). That's what we did. We built a Relay application (written in .Net Core) that connects to the 3CX API, then our Relay exposes methods via REST / Websockets. Our applications talk to the Relay rather than directly talking with the 3CX API. This, however, is a ton of work.

I saw a forum post by Nick Galea this morning stating 3CX may finally release their REST API to the public. If / when they do, life will get a lot easier for all of us.
 
Last edited:
  • Like
Reactions: Evolute IT
Hi, Yes REST API is on the cards and we are moving towards this for our next version. We know its needed urgently. Lets us know what functions you would look for...
 
Hi, Yes REST API is on the cards and we are moving towards this for our next version. We know its needed urgently. Lets us know what functions you would look for...
- Trigger call
- get extension status
- get queues stats
- get agents stats
- Event API (via web socket) (for "on call pickup", "on call ended", etc.)
 
  • Like
Reactions: Aaron_A-COM
Oh my, Nick, that's a very long list :). Here are what I see requested most frequently from our customers, along with my top wishes:
  • Separate events by type (call, registration, property changes, etc.) There are a lot of different types of events. Ideally we would subscribe to the specific event types.

  • Cloning objects, like DNs is a pain. If we could request an extension or group object (for example) and get back JSON, that would be awesome.

  • Access to history records. For example, request queue statistics with a Key value > X. That would make it easy to synchronize PostgreSQL with another database to create custom reports. When you do this, or Exporter tool will no longer be needed, but that's the right thing to do.

  • I know this is not currently in the Call Control API, but presence status changes would be nice. As you know it is a property of the DN and there are property events but the event does not indicate what has changed, so you have to keep track yourself what the previous value was. Having an event that only fires when the presence changes would be awesome.

  • I don't know if this is feasible, but an event when the call count changes. We can get active connections, but figuring out how many of those calls count against your simultaneous calls is a challenge. This would be great for tracking over time usage so we can estimate when an upgraded license is needed.

  • Access to the audio stream so we can perform voicemail detection

  • Ability to create scheduled conference calls and web meetings. I can't figure out how to add a 3rd caller to an existing call either (3-way calling).

  • Uploading and downloading files to 3CX. For example, uploading prompt files, and downloading CDRs, Recordings, Voicemails, etc.

  • Access to server status (CPU, Disk, RAM, service status, license information, expiration dates, etc.). This is already available in the existing REST API, but having it documented, and at some level supported, would be nice.

  • Paid developer support would be nice too.

  • If you want a full list, I can provide.
Obviously having our Relay is a huge business advantage for us at VoIPTools, but the right thing for the 3CX community is to get access to the 3CX APIs in a supported, documented way. I think, in the end, that will be a win for all of us.
 
Hello,

With my script a get too a error :

Une exception non gérée du type 'System.NullReferenceException' s'est produite dans System.Private.CoreLib.dll
Object reference not set to an instance of an object.

I set projet to .NET Core 2.1 but same error ...
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,476
Latest member
awan05