I am new to zammad and am configuring asterisk-zammad-cti-bridge for the first time by following this guide:
Right away, however, I can’t figure out what to do and where… in snso that in some steps of the guide it’s not clear if I have to do things in zammad or in asterisk.
in the “Setup” section of the guide for example, an ami user has to be created in /etc/asterisk/manager.d/zammad.conf but the manager.d folder doesn’t exist… i still solved it by creating the user from the freepbx GUI…
In step 5 the config.cfg file must be copied but it doesn’t say where… and so I try to copy in /etc/asterisk/
in step 8 it is asked to run the script ./asterisk-zammad-cti-bridge but from step 1 there is no mention of this script… where do I get it?
Should the second section of the “systemd” guide be followed for asterisk or zammad?
Please kindly help me to understand what I need to do to make this integration work? Has anyone already followed this guide and how did it work out?
You have to download the script from the git repo, which you are reading from right now. Put it somewhere on your filesystem (mine is at /opt/asterisk-zammad-bridge/), copy the config to that folder and edit it like described.
Using systemd depends on your choice, if you want to start the script manually or as a service.
thanks for answering me, I followed your advice and it seems to be making a step forward: I loaded the script and put in the folder /opt/asterisk-zammad-cti-bridge/ I edited the conf.cfg file and changed the permissions after which I started the script and now I get this result:
Can’t locate AnyEvent/HTTP.pm in @INC (@INC contains: /root/perl5/lib/perl5/5.16 .3/x86_64-linux-thread-multi /root/perl5/lib/perl5/5.16.3 /root/perl5/lib/perl5/ x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/loca l/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib 64/perl5 /usr/share/perl5 .) at ./asterisk-zammad-cti-bridge line 4.
BEGIN failed–compilation aborted at ./asterisk-zammad-cti-bridge line 4.
Maybe you have to load or install the modules first? As i remember, i had to install at least the Asterisk::AMI-Module. It looks like you have to install the AnyEvent::HTTP-Module as well.
Right…
I actually skipped that step because perl is already there, but I understand that these dependencies are missing.
Now in fact I installed the module as you suggested and the script went ahead
It stopped now at ‘version.pm’ with the same error:
Can’t locate version.pm in @INC (@INC contains: /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi /root/perl5/lib/perl5/5.16.3 /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /root/perl5/lib/perl5/Asterisk/AMI.pm line 621.
BEGIN failed–compilation aborted at /root/perl5/lib/perl5/Asterisk/AMI.pm line 621.
Compilation failed in require at ./asterisk-zammad-cti-bridge line 5.
BEGIN failed–compilation aborted at ./asterisk-zammad-cti-bridge line 5.
Since the guide shows how to install for debian I do a check first to know if the libraries are also the same for centos7, I will then try to install and restart the script
Can’t locate version.pm in @INC (@INC contains: /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi /root/perl5/lib/perl5/5.16.3 /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /root/perl5/lib/perl5/Asterisk/AMI.pm line 621.
BEGIN failed–compilation aborted at /root/perl5/lib/perl5/Asterisk/AMI.pm line 621.
Compilation failed in require at ./asterisk-zammad-cti-bridge line 5.
BEGIN failed–compilation aborted at ./asterisk-zammad-cti-bridge line 5.
Your script on your pbx should produce an output like that on an incoming call:
2024-03-27 17:35:14 +0100 [debug] got event: QueueCallerJoin
2024-03-27 17:35:14 +0100 [info] pushing to Zammad post queue: direction=in&callId=99271711557291.8081&event=newCall&from=01xxxxxx7&to=Werkstatt
2024-03-27 17:35:14 +0100 [info] posting to Zammad: direction=in&callId=99271711557291.8081&event=newCall&from=01xxxxxx7&to=Werkstatt
2024-03-27 17:35:17 +0100 [debug] got event: QueueCallerAbandon
2024-03-27 17:35:17 +0100 [debug] Queue: 9927
2024-03-27 17:35:17 +0100 [info] pushing to Zammad post queue: event=answer&callId=99271711557291.8081&direction=in&user=Uebergabe
2024-03-27 17:35:17 +0100 [info] pushing to Zammad post queue: event=hangup&callId=99271711557291.8081&direction=in&cause=normalClearing
2024-03-27 17:35:17 +0100 [info] posting to Zammad: event=answer&callId=99271711557291.8081&direction=in&user=Uebergabe
2024-03-27 17:35:17 +0100 [info] posting to Zammad: event=hangup&callId=99271711557291.8081&direction=in&cause=normalClearing
Your zammad production.log should then have entries like that:
I, [2024-03-27T17:40:12.147499#188340-31664760] INFO -- : Started POST "/api/v1/cti/kb6lTWc0nweyffr_8" for 192.168.40.1 at 2024-03-27 17:40:12 +0100
I, [2024-03-27T17:40:12.154481#188340-31664760] INFO -- : Processing by Integration::CtiController#event as HTML
I, [2024-03-27T17:40:12.154613#188340-31664760] INFO -- : Parameters: {"direction"=>"in", "from"=>"03xxxxxx40", "to"=>"JSK", "callId"=>"99201711557601.8086", "event"=>"newCall", "token"=>"kb6lFqqr0nweyffr_8"}
I, [2024-03-27T17:40:12.297110#188340-31664760] INFO -- : Completed 200 OK in 142ms (Views: 0.3ms | ActiveRecord: 55.7ms | Allocations: 28101)