martinvonwittich/asterisk-zammad-cti-bridge

TLS Connicting to Zammad

andyacep opened this issue · 4 comments

HI, Thankyou for this code

ive installed it on a freepbx centos system, can you help?

Im getting the below error event though the zammad server has SSL and works over https ok

2020-01-08 10:16:11 +0000 [info] posting to Zammad: direction=in&to=550&callId=5501578478563.12264&from=07766163096&event=newCall
Use of uninitialized value $data in string ne at ./asterisk-zammad-cti-bridge line 84.
undef
\ {
Reason "TLS support not available on this system",
Status 596,
URL "https://xxxxx.xxxx.xx.xx/api/v1/cti/TVe9XESeCxxxXSbycMSiIuZJWXA"

Reason "TLS support not available on this system",
Status 596,

The error originates from the AnyEvent::HTTP library that asterisk-zammad-cti-bridge uses to submit the request to Zammad:

https://metacpan.org/pod/AnyEvent::HTTP#METHODS

If an internal error occurs, such as not being able to resolve a hostname, then $data will be undef, $headers->{Status} will be 590-599 and the Reason pseudo-header will contain an error message. Currently the following status codes are used:

596 - errors during TLS negotiation, request sending and header processing.
[...]

Try to install the package perl-Net-SSLeay, I believe that should resolve the issue.

start asterisk-zammad-cti-bridge.service

logs show

Jan 9 09:19:28 pbx asterisk-zammad-cti-bridge: 2020-01-09 09:19:28 +0000 [info] pushing to Zammad post queue: direction=in&to=550&callId=5501578561564.95&from=07966163026&event=newCall

but nothing is happening at the Zammad end?

But running from the cli
2020-01-09 09:29:25 +0000 [info] posting to Zammad: direction=in&to=550&callId=5501578562162.139&from=07966163026&event=newCall

call shows up straight away