Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement Telegram? #770

Closed
Julian0o opened this issue Feb 16, 2017 · 26 comments
Closed

How to implement Telegram? #770

Julian0o opened this issue Feb 16, 2017 · 26 comments
Assignees

Comments

@Julian0o
Copy link

Julian0o commented Feb 16, 2017

I'm trying to get telegram flying. I allready created a telegram bot and put the accesstoken in the zammad telegram configuration. But when i chat the telegram bot, nothing apears in zammad.

Is there something special with the configuration to look for?

Thanks!

@martini martini self-assigned this Feb 16, 2017
@martini
Copy link
Collaborator

martini commented Feb 16, 2017

Hi @Julian0o,

can you check if you receive the telegram webhock messages by watching in your Zammad log file (log/production.log) and enter a new chat message via telegram client?

If there is no entire, just delete you telegram bot (via BotFather and in Zammad admin interface), register the bot again and add it again in Zammad admin interface. Then try sending new messages via telegram client again.

If there is an entry in log/production.log but no ticket in Zammad appears, there should be an error message which helps me to get it working. :)

-Martin

@Julian0o
Copy link
Author

Julian0o commented Feb 16, 2017

Thanks Martin.

I will test this. But i have something in mind. Our new Next Generation Super Duper Firewall :) Will check this.

@Julian0o
Copy link
Author

Okay, No Firewall Issue. But i get nothing in the logs. Only when i add the telegram token.

@martini
Copy link
Collaborator

martini commented Feb 16, 2017

Okay, No Firewall Issue. But i get nothing in the logs. Only when i add the telegram token.

That's correctly. Telegram is checking the connection to your Zammad instance (only https, valid certificate and so on...).

-=> Normally this should work now, just fine.

Can you try to delete and add your bot at telegram again (just to be sure). And can somebody else write to you bot too?

@Julian0o
Copy link
Author

Have already made a new bot and someone else has also written to the bot. The bot has no special settings to be set?

@martini
Copy link
Collaborator

martini commented Feb 16, 2017

No. No special settings. And I tested it today about 10:00 with a complete new number and new bot. Just was working fine. :-/

@thorsteneckel
Copy link
Contributor

For me it was an HTTPS issue. Telegram needs an HTTPS endpoint with valid certificates (as @martini mentioned above). After switching from HTTP to HTTPS it incoming messages were possible.

@Julian0o
Copy link
Author

I have a valid SSL Certificate.

@martini
Copy link
Collaborator

martini commented Feb 16, 2017

JFI: https://docs.zammad.org/en/latest/channel-telegram.html -> no extra settings for bot settings. Just normal (fast) way.

@martini
Copy link
Collaborator

martini commented Feb 16, 2017

Strang is, that the first/initial telegram http call works fine. If your http_type or fqdn would be wrong, you would get there an error message back from telegram. -> But telegram says, all fine (otherwise you would get an error message in Zammad).

It seems that telegram itself has an issue right now. 🤔 Try to test in in 30 min again. Strange.

@martini
Copy link
Collaborator

martini commented Feb 17, 2017

Any news today? You get the http calls from telegram now?

@mgibu27
Copy link

mgibu27 commented Feb 20, 2017

Having the same problem. Bot registered and green in Zammad configuration. When I send a message with telegram there goes nothing in Zammad. There is also no message in production.log.

Using a valid SSL certificate and Zammad is reachable with HTTPS.

@Julian0o
Copy link
Author

Problem still persists. No Idea why...

@gitviola
Copy link

gitviola commented Mar 2, 2017

I can't reproduce it. @Julian0o @mgibu27 have you already tried to create a new bot?

@mgibu27
Copy link

mgibu27 commented Mar 3, 2017

Yes, I already tried it with two other new bots. But still the same problem.
I'm running Zammad on a private DSL line with no static IP but I use DynDNS for public access from the web. The SSL certificate is valid and I use the standard HTTPS Port 443.
Do I need another port for telegram or something?

@Julian0o
Copy link
Author

Julian0o commented Mar 3, 2017

I also tryed another telegram account with a new bot. There is nothing in the logs. Maybe we could start a teamviewer session to look for the problem. I'm from Düsseldorf ;)

@gitviola
Copy link

gitviola commented Mar 3, 2017

@Julian0o I live really close to Düsseldorf. If you want we could hang out at starbucks or any other place to have a nice talk and a debugging session. Send me an email or ping me on twitter!

@mgibu27 I wonder if telegram has some special check on the resolved ip address (would be strage). Might still be related to @Julian0o's problem. Does HTTP port 80 also serve your zammad instance or redirect to HTTPS?

@Julian0o
Copy link
Author

Julian0o commented Mar 3, 2017

@schurig You've got mail.

We have a special configuration here.
Public IP -> PaloAlto NG Firewall -> Kemp Loadmaster -> Zammad
Maybe this does something unspecified...

@angrytomatoe
Copy link

angrytomatoe commented Mar 7, 2017

Same problem here.
Do I also need to allow http (port 80) in our firewall?

I already tried with a newly created bot, but no luck. After starting a chat with the bot, neither a welcome-message is sent nor ticket created. zammad-log is quiet too.

@martini
Copy link
Collaborator

martini commented Apr 13, 2017

@schurig @Julian0o any process/feedback here? Anything discover why telegram is not sending messages to you?

@Julian0o
Copy link
Author

@martini No nothing yet. We forgot our date :) Will try to start a new session with @schurig

@mmojadad
Copy link

Currently when i chat the telegram bot, nothing apears in zammad. Is there any issue ?

@Julian0o
Copy link
Author

Julian0o commented Apr 21, 2017

Currently when i chat the telegram bot, nothing apears in zammad. Is there any issue ?<

Did it work earlyer?

@mmojadad
Copy link

@Julian0o
No. Its new zammad implementation. But i used this bot also for my crisp chat, In crisp side also do not working.

@mmojadad
Copy link

I installed SSL and now Telegram bot working fine. :)

@martini
Copy link
Collaborator

martini commented Jun 22, 2017

Update: Today I figured out why telegram is not sending a message to the webhook endpoint.

Get the reason why Telegram is not sending webhooks

You can ask telegram what the issue is:
curl https://api.telegram.org/bot:your_bot_key/getWebhookInfo

I my case, telegram was not able to verify my SSL certificate:

"last_error_message":"SSL error {337047686, error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed}"

But in my browser the SSL certificate look fine.

Why?

Telegram need the whole certificate chain (it's also called CA Bundle or full chained certificate).

How to verify if my server is serving full chained certificate?

Use the following url, just replace support.zammad.com with your host: https://www.ssllabs.com/ssltest/analyze.html?d=support.zammad.com&hideResults=on&latest

If you see "Chain issues: Incomplete" you do not serve full chained certificate.

How to fix that?

Download the full chained certificate for your SSL certificate provider and install this on your webserver.

References:

https://www.cubewebsites.com/blog/guides/fix-telegram-webhooks-not-working/

@Julian0o
Copy link
Author

Nice! This could be the solution. I will try it when there is some time to play with zammad ;)

@martini martini closed this as completed Jul 11, 2017
@Julian0o
Copy link
Author

Yea, after adding the certificate chain Telegram is working! Thanks!

@martini
Copy link
Collaborator

martini commented Jul 31, 2017

Thanks for feedback! 🤓

@zammad zammad deleted a comment Jul 31, 2017
@zammad zammad deleted a comment from thorsteneckel Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants