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

Telegram app coud not connect to tg2ip, when ipv6 off on server with tg2sip #40

Open
oleg9301 opened this issue Oct 23, 2020 · 1 comment

Comments

@oleg9301
Copy link

oleg9301 commented Oct 23, 2020

debian 10
ipv6 disable in grub(so there is no address family ipv6 at all)(ipv6.disable=1)

root@sd-sip1:/opt/tg2sip# ./tg2sip
[20:37:44.335][t:6342][p:6342][pjsip][info] pjsua version 2.9 for Linux-4.19.0.12/x86_64/glibc-2.27 initialized
[20:37:44.347][t:6351][p:6342][core][info] TG client authorization ready
[20:37:44.347][t:6342][p:6342][core][info] Loading contacts cache
[20:37:44.349][t:6342][p:6342][core][info] Loaded 0 usernames and 1 phones into contacts cache
[20:37:44.484][t:6351][p:6342][core][info] TG client connected
[20:37:51.741][t:6345][p:6342][core][debug] incoming SIP call #0 from "274 sip:274@IP to sip:+79154199999@IP with call-id 3fc49a363c0b3f903a0cbe1b793a9f5e@IP
[20:37:51.748][t:6342][p:6342][core][debug] [6342-1] associated with SIP#0
[20:37:51.748][t:6342][p:6342][core][debug] [6342-1] setting SIP #0 in ringing mode
[20:37:51.768][t:6342][p:6342][core][debug] [6342-1] dialing tg
[20:37:51.769][t:6342][p:6342][core][debug] [6342-1] found id 114185469 for 79154199999 in phone cache
[20:37:51.769][t:6342][p:6342][core][debug] [6342-1] associated with TG#1
[20:37:57.142][t:6342][p:6342][core][debug] [6342-1] stored user id 114199999
[20:37:57.142][t:6342][p:6342][core][debug] [6342-1] creating voip for TG #1
[20:37:57.142][t:6342][p:6342][tgvoip][info] update data saving mode, config 0, enabled 0, reqd by peer 0
[20:37:57.142][t:6342][p:6342][tgvoip][warning] Set remote endpoints, allowP2P=0, connectionMaxLayer=92
[20:37:57.142][t:6342][p:6342][tgvoip][trace] Adding endpoint: 134.209.178.88:558, UDP
[20:37:57.142][t:6342][p:6342][tgvoip][trace] Adding endpoint: 134.209.176.124:554, UDP
[20:37:57.142][t:6342][p:6342][tgvoip][trace] Adding endpoint: 91.108.8.5:521, UDP
[20:37:57.142][t:6342][p:6342][tgvoip][trace] Adding endpoint: 134.209.178.131:559, UDP
[20:37:57.142][t:6342][p:6342][tgvoip][trace] Adding endpoint: 91.108.8.2:522, UDP
[20:37:57.142][t:6342][p:6342][tgvoip][warning] Starting voip controller
[20:37:57.145][t:6342][p:6342][tgvoip][error] error creating socket: 97 / Address family not supported by protocol
[20:37:57.145][t:6342][p:6342][tgvoip][trace] Call state changed to 4
[20:37:57.145][t:6342][p:6342][core][debug] [6342-1] answering SIP #0
[20:37:57.146][t:6342][p:6342][core][debug] [6342-1] bridging tgvoip audio with SIP#0
[20:37:57.147][t:6355][p:6342][tgvoip][info] before create audio io
[20:37:57.147][t:6355][p:6342][tgvoip][info] AEC: 0 NS: 0 AGC: 0
[20:37:57.148][t:6355][p:6342][tgvoip][info] Audio initialization took 0.001033 seconds
[20:37:57.148][t:6355][p:6342][tgvoip][warning] Not ready to send - enqueueing
[20:37:57.148][t:6355][p:6342][tgvoip][warning] Not ready to send - enqueueing
[20:37:57.148][t:6355][p:6342][tgvoip][warning] Not ready to send - enqueueing
[20:37:57.148][t:6355][p:6342][tgvoip][warning] Not ready to send - enqueueing
[20:37:57.148][t:6355][p:6342][tgvoip][warning] Not ready to send - enqueueing
[20:37:57.148][t:6355][p:6342][tgvoip][info] === send thread exiting ===
[20:38:13.272][t:6342][p:6342][tgvoip][debug] Entered VoIPController::Stop
[20:38:13.272][t:6342][p:6342][tgvoip][debug] before shutdown socket
[20:38:13.272][t:6342][p:6342][tgvoip][debug] before join sendThread
[20:38:13.272][t:6342][p:6342][tgvoip][debug] before join recvThread
[20:38:13.272][t:6342][p:6342][tgvoip][debug] before stop messageThread
[20:38:13.272][t:6342][p:6342][tgvoip][debug] Before stop audio I/O
[20:38:13.272][t:6342][p:6342][tgvoip][debug] Left VoIPController::Stop [need rate = 0]
[20:38:13.272][t:6342][p:6342][core][debug] [6342-1] hangup TG #1
[20:38:13.273][t:6342][p:6342][tgvoip][debug] Entered VoIPController::~VoIPController
[20:38:13.273][t:6342][p:6342][tgvoip][debug] before close socket
[20:38:13.273][t:6342][p:6342][tgvoip][debug] before delete audioIO
[20:38:13.273][t:6342][p:6342][tgvoip][debug] before delete encoder
[20:38:13.273][t:6342][p:6342][tgvoip][debug] before delete echo canceller
[20:38:13.273][t:6342][p:6342][tgvoip][debug] Left VoIPController::~VoIPController
^C[20:38:51.950][t:6342][p:6342][core][info] performing a graceful shutdown...

key:
[20:37:57.145][t:6342][p:6342][tgvoip][error] error creating socket: 97 / Address family not supported by protocol

when I enable ipv6 everything OK.

@Infactum
Copy link
Owner

As log says - this is tgvoip related problem.
This library is in legacy state now and not really supported by telegram. Also it's code written poorly enough. So I'm not really interested in investigation this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants