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:
This causes a
newCallrequest that is immediately followed by a
hanguprequest 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 the
hanguprequest before the
newCallrequest, 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.