I had mentioned my Asterisk AMI -> Zammad CTI script in the past; back then it was just a GitHub gist.
Since then, I’ve added the following improvements:
-
It now queues events internally to ensure that they are pushed to Zammad in order.
This is necessary because it uses asynchronous HTTP requests, and the old version was able to confuse Zammad when you’ve configured your Asterisk queues like this:
joinempty=yes leavewhenempty=loose
This causes a
newCall
request that is immediately followed by ahangup
request when a caller joins an empty queue (because Asterisk will allow him to, but also immediately kick him). Due to the asynchronous HTTP requests, it was possible for Zammad to process thehangup
request before thenewCall
request, which obviously didn’t work. The internal queue solves this issue. -
The configuration has been separated into a config file.
-
It prints a readable log to STDOUT that allows you to see what’s going on.
-
It can now reconnect to Asterisk when the connection breaks (e.g. due to an Asterisk restart).
It’s been running for the last two months without any significant issues, so I feel it now deserves a proper repository and a new thread
You can find it here: https://github.com/martinvonwittich/asterisk-zammad-cti-bridge
PS: can we get a “General discussion” category or something similar here? This topic doesn’t really fit in any of the current categories.