This Perl script serves as a bridge between an Asterisk server and the Zammad CTI interface. It connects via AMI to Asterisk and monitors it for queue events; the relevant ones will be pushed to Zammad's CTI interface.
This version supports TLS, so you can run it in a different host from asterisk.
- Can only monitor queue events and nothing else.
-
Enable AMI in Asterisk in
/etc/asterisk/manager.conf
. -
Create the file
/etc/asterisk/manager.d/zammad.conf
with the following contents:[zammad] secret = xxx read = agent
Use a strong randomly generated password, e.g.
$(pwgen 32)
. -
Run
manager reload
inasterisk -r
. -
Enable Zammad's CTI (Generic) interface.
-
Rename
config.cfg.sample
toconfig.cfg
. Edit and fill in your Zammad CTI URL and your AMI secret. -
Build and start the container:
docker-compose up --build -d
-
Check the logs and troubleshoot:
docker-compose logs -f
-
Take down and remove container:
docker-compose down
-
Force re-building:
docker-compose up --force-recreate --build -d
-
Remove orphan images:
docker image prune -f
BONUS. One-liner
```
docker-compose up --force-recreate --build -d && docker image prune -f && docker-compose logs -f
```
Add config.cfg sections and edit the entrypoint of the Dockerfile accordingly to load them by using an script. Or just simply spin up a second container with a completely new config.cfg