Infactum / tg2sip

Telegram <-> SIP voice gateway
GNU General Public License v2.0
281 stars 104 forks source link

failed to start TG client #12

Closed nik13513513 closed 5 years ago

nik13513513 commented 5 years ago

Hello!

Tryed to start app, received api_id & api_hash, writed them to settings file, and got this message:

ps. gen_db freezes after enter phone number.

[13:06:35.934][t:3343][p:3334][core][trace] /home/user/tg2sip/tg2sip/tg.cpp:97 TG client got response with ID 1 error { code = 400 message = "Can't lock file" }

[13:06:35.934][t:3343][p:3334][core][error] TG client authorization error error { code = 400 message = "Can't lock file" }

Infactum commented 5 years ago

Have you authorized with gen_db app before running client? If it is not working than you should check tdlib log files. Don't forget to enable verbose logging in settings.ini before.

nik13513513 commented 5 years ago

yes, i start gen_db first. But is freezes after enter tel. number. I guess it can't connect to tg servers. Can i write mtproto proxy settings in .ini file, not socks5?

Infactum commented 5 years ago

Afaik public version of tdlib don't have support of mtproto, thats why you can only use socks5. Updated: MTProto proxy is supported since tdlib 1.3. Current gateway version is based on tdlib 1.2.

nik13513513 commented 5 years ago

gen_db must exit gracefully?

Infactum commented 5 years ago

Sure.

nik13513513 commented 5 years ago

gen_db don't produce any logs, only td.binlog, but it is binary.

nik13513513 commented 5 years ago

Infactum, can you update tdlib to 1.3, or i may try this? For using proxy

Infactum commented 5 years ago

It's open source project, so you can fork it and try anything. Updating tdlib won't solve your problem fully, because you also need to set proxy for libtgvoip (audio) if you are not planning to use p2p. Usage of VPN or placing TG2SIP server somewhere where telegram is not blocked is preferred way.

nik13513513 commented 5 years ago

ok, thnks!