CTI API integration with 3CX

Hi There

Did someone already test the new CTI API with the 3CX CRM Integration?

Looks like this should work, on ma first view:

regards Urs



not but I’ve contacted 3CX and they said that the easiest way is if zammad integrates 3CX.

They mean that is done within one day.

I think Zammad and 3CX would be a very good combination.

I’m glad that they know how much time it would take us, haha. :slight_smile:

1 Like


I hope you and 3CX will find a way to integrate each others application.

3CX already integrated freshdesk and zendesk.

The Feature Request like half a year ago didn’t get much attention :confused:

So isn’t it possible to connect these two Systems?
On the Zammad side use the CTI API
On the 3CX side uing the open CRM API?

Don’t they match in a usable way?

regards urs

I think this can be possible without looking in too deep.
Currently the integration is simply no planned and thus not possible without workaround. :frowning:

How can the development of this feature be accelerated? Maybe by sponsoring this specific feature?

1 Like

Hey there @jampy sorry for the delay, I forgot to answer you:

The development can always get acceleration with sponsoring this feature!
We’re also open for a group of persons willing to sponsor this, as this will decrease the financial pressure on each individual person.

If you’re interested in a quote, feel free to contact us at sales[at]zammad[dot]com.
We’ll define the needs then and see what we can do :slight_smile:

I’ve tried tackling this with 3CX’s CRM Integration feature and I’ve had “some” success.

It looks like there’s only a fairly limited integration possible while using the CRM integration.
3CX Basically triggers three types of events

  • Contact matching at the start of the call
  • Contact creation if no contact is found by the contact matching event
  • Call journaling at the end of the call

The only information you can get during the contact matching event is the external number that is calling or is dialled. No information regarding direction of the call or anything but a newCall event could be triggered from here.

Call journaling at the end of the call gives you all kinds of information including call direction, whether it was missed, unanswered or whatever. Given that it is triggered at the end of the call we have no way of using this information for ticket lookup/creation assistance during the call.

Right now I’m thinking of just creating all calls as inbound calls to have the information present in Zammad and then using the journaling event perform the hangup events. Is this something that would be useful to you guys? It leaves bad information in Zammad with regards to call direction but at least an agent could make use of the feature if they know about its limitations.

3CX also has this call flow thing which is capable of http requests. I haven’t looked into it too much to see whether it’d maybe be feasible to construct Zammad integration through that.

3CX’s call control API which let’s you write server side .net plugins has never been supported and the documentation pages have recently vanished, seems like it’s being quietly deprecated?

3CX v16 is on its way and recent blog posts about it mention extended call journaling in the CRM integration and that the call flow designer has a new scripting engine with deeper integration. This may allow for better Zammad integration in the near future.

1 Like

Hi SupersonicWaffle,

nice to hear.

Could you provide us your template? Works it with 15.5 too?
Of course without your authentication information.

Best regards

Hey lobmayer,

I don’t have the ReportCall scenario (Call Journaling) fully implemented yet. I will provide the template once that’s done. I expect to have this implemented tomorrow or Tuesday.

Just as a warning, I haven’t found an elegant way to create a callId so I currently request unix time from http://now.httpbin.org/, and store it in a variable as callId. You may be able to generate a random number but I don’t think we can guarantee a unique callId that way

I know what you mean. I was disappointed by both the 3CX CRM Integration and the one provided by Zammad so I ended up with two somewhat pragmatic solutions.

First, you have WAY more possibilities when using the 3CX web client API. It’s unofficial, but seems very well done and it’s rather simple. Get started here: https://www.npmjs.com/package/@3cx/api

It’s easy to add more commands, like polling the currently active calls, which is what I’m using to show caller information while ringing.

For Zammad I’m using a Electron shell that allows me to remote control / enhance the UI - like pre-filling a new ticket during a call.

I was hoping you would jump into the discussion after reading about your efforts on other threads.

Unfortunately I’m not a developer and I don’t have that much experience outside of writing scripts to automate infrastructure tasks. I’m not quite sure how an implementation through the api you linked would look like but it does look fairly straight forward to use.

Where do you run your integration? IIRC you mentioned the importance of a mobile app for you guys, does your integration handle calls through the 3cx mobile app as well? Do you have any future plans with it outside of internal use?

I’ll finish the template but I’m really torn whether I want all that bad information in Zammad, so I haven’t decided yet whether I’m even going to use it in production. My guess is that the assistance it would offer would make things more comfortable for agents but it still irks me.

I’m still experimenting with everything, so I’m in a proof-of-concept phase.

My solution requires a really small server that acts as a mediator between Zammad (or any other ticket system) and 3CX. It can be in installed on the Zammad server machine.

The program on that server is continuously logged in to 3CX and does things like polling/monitoring the ongoing calls multiple times per second (this works). It uses this information to feed a small UI that is displayed beneath the Zammad UI and used the Zammad API to display additional information. The Zammad CRM API is still used for phone number resolution.

Also the 3CX webclient is displayed alongside.

This solution offers great freedom but also is relatively complex on the UI side. If you can live with the Zammad CRM API alone, it’s much easier.

On the mobile side we will use the native 3CX client for calls but I have no solution for after-call-work there, yet. Perhaps the Zammad mobile client could offer an option to manually create a ticket based on the call log.

I’d be happy to release everything to open source, but it takes great effort to produce/document a project so that it can be useful for others, that have slightly differrnt requirements for sure…

I could probaby live with the way Zammad CTI works but I have a strong interest in using it according to what it offers which 3CX CRM API likely won’t offer. I’d be very interest in at least running your server side piece.

I’d be happy to contribute to the best of my abilites. I could maybe give it a shot to create a dockerfile. Don’t expect too much though :smiley:

Any NodeJS programmer could probably implement that software quickly.

If you no such person in your organization, I could see what I can do. Publishing an image on Docker Hub should not be a problem.

What exactly are you missing from the 3CX API?

Unfortunately we do not have a NodeJS programmer among us and I wouldn’t want to impose myself like this.

Using the 3CX CRM API there’s a lot of information missing, you can’t determine call direction or get the internal number that’s calling or being called during the newCall event, this means there’s a lot of inaccurate information in Zammad as all calls would have to be handled as either inbound or outbound. I’ve also been told that any type of contact lookup results would be cached and a newCall event wouldn’t be triggered realiably. answer events in Zammad are also not possible.

I’m currently struggling to pass the callId value from the contact matching scenario to the call journaling scenario. For some reason there’s no output created. I’ll try to fix this over the course of the day and get back to you.

I’m happy that I’m not alone who want to have an Integration of 3CX in Zammad. :smiley:

Maybe one day 3CX and Zammad are gracious enough for integration.

Could you vote here on 3CX for this Idea please: https://www.3cx.com/community/threads/zammad-crm-integration.59379/#post-249652

1 Like

The only “official” type of integration that you could expect from 3CX would probably be a call journal through their CRM integration feature, which isn’t that hard to create but is very limited. There’s no good way to use it for the ticket creation proccess and using it just as a journal, if that’s something you need I can provide / help with a template. For me it kind of defeats the purpose as I would like more assistance during ticket creation.