martinvonwittich / asterisk-zammad-cti-bridge

A bridge between an Asterisk server (via AMI) and the Zammad CTI interface.
GNU General Public License v3.0
22 stars 8 forks source link

TLS Connicting to Zammad #3

Open andyacep opened 4 years ago

andyacep commented 4 years ago

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"

martinvonwittich commented 4 years ago

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.

andyacep commented 4 years ago

Perfect answer works a treat now, thankyou

From: martinvonwittich notifications@github.com Reply to: martinvonwittich/asterisk-zammad-cti-bridge reply@reply.github.com Date: Wednesday, 8 January 2020 at 19:07 To: martinvonwittich/asterisk-zammad-cti-bridge asterisk-zammad-cti-bridge@noreply.github.com Cc: Andrew Powell Andy@pooleit.com, Author author@noreply.github.com Subject: Re: [martinvonwittich/asterisk-zammad-cti-bridge] TLS Connicting to Zammad (#3)

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/martinvonwittich/asterisk-zammad-cti-bridge/issues/3?email_source=notifications&email_token=AEIFGCWIVEHYV3HJABPSMT3Q4YP5XA5CNFSM4KEGA4NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEINUDSY#issuecomment-572211659, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEIFGCU3QJXDUNR4SOM6KRLQ4YP5XANCNFSM4KEGA4NA.

Kind Regards Andrew Powell


[https://www.pooleit.com/sigImages/PooleIT.png]http://www.pooleit.com

PooleIT Limited Unit 23, The Glenmore Centre Poole, Dorset BH12 4FB 01202232117 www.pooleit.comhttp://www.pooleit.com Support@pooleit.commailto:Support@pooleit.com


PooleIT accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. PooleIT Limited, Company Number 08220660.

andyacep commented 4 years ago

HI

Nearly there if I launch it from a putty session logged in as root, then cd /opt/asterisk-zammad-cti-bridge/ then ./asterisk-zammad-cti-bridge it works really well If I run it as a service I can see it starts ok in /var/log/message but its throwing the tls error which it doesn’t as a root putty user, and also fills the messages log file really fast If I run it from the VM console it starts but doesn’t see the incoming calls

Linux eh always a challenge

From: martinvonwittich notifications@github.com Sent: 08 January 2020 19:07 To: martinvonwittich/asterisk-zammad-cti-bridge asterisk-zammad-cti-bridge@noreply.github.com Cc: Andrew Powell Andy@pooleit.com; Author author@noreply.github.com Subject: Re: [martinvonwittich/asterisk-zammad-cti-bridge] TLS Connicting to Zammad (#3)

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/martinvonwittich/asterisk-zammad-cti-bridge/issues/3?email_source=notifications&email_token=AEIFGCWIVEHYV3HJABPSMT3Q4YP5XA5CNFSM4KEGA4NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEINUDSY#issuecomment-572211659, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEIFGCU3QJXDUNR4SOM6KRLQ4YP5XANCNFSM4KEGA4NA.

Kind Regards Andrew Powell


[https://www.pooleit.com/sigImages/PooleIT.png]http://www.pooleit.com

PooleIT Limited Unit 23, The Glenmore Centre Poole, Dorset BH12 4FB 01202232117 www.pooleit.comhttp://www.pooleit.com Support@pooleit.commailto:Support@pooleit.com


PooleIT accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. PooleIT Limited, Company Number 08220660.

andyacep commented 4 years ago

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