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

Relay Server Connection Issues with Telegram API #20

Open
Laky-64 opened this issue Apr 21, 2024 · 3 comments
Open

Relay Server Connection Issues with Telegram API #20

Laky-64 opened this issue Apr 21, 2024 · 3 comments
Labels
Common Problems wontfix This will not be worked on

Comments

@Laky-64
Copy link
Member

Laky-64 commented Apr 21, 2024

Before of all

This document describes a known issue encountered when using the library with Telegram. It's important to note that this is not a limitation of the library itself, but rather a problem inherent to the Telegram API.

Description

  • There can be occasional connection failures between the Relay server and the user's Telegram client when P2P is disabled, this can cause API calls to fail unexpectedly.
  • This issue has already been reported to Telegram for them to investigate and fix, unfortunately, there is no current solution available from their side.

Impact

Users might experience occasional API call failures due to these connection issues.

Workaround (if applicable):

Unfortunately, there is no current workaround available due to the nature of the issue residing within the Telegram API.

Additional Notes

We will continue to monitor the situation and update this document when a fix is implemented by Telegram.

@oscaracena
Copy link

I've got this problem very frequently (almost always) when calling a user connected by cellular data (not WiFi). I've tested different carriers with the same results.

And, what is more distressful, it seems to happen at certain hours in the day (I've no problem in the early morning, but after 10 am, no chance to connect). The Telegram client which receives the call is stalled in "Exchanging encryption keys...".

I know this is no PyTgCalls problem, I just wanted to share my experience here, in case we could trace a workaround or something... 😅

Cheers!

@KyotoByte
Copy link

@oscaracena Interesting 🤔

@Laky-64
Copy link
Member Author

Laky-64 commented Apr 29, 2024

State Report of 29/04/2024

After several attempts and tests, we were unable to find a solution regarding the Telegram V11 protocol together with @vkryl (For TgX & NTgCalls), as the connection to the Relay Servers randomly sometimes doesn't work, so Vkryl decided to disable the v11 protocol directly TgX side, but this led to breaking compatibility with NTgCalls which currently implements only the v11 protocol.

Have you tried implementing the V8 protocol?

Yes, but without success, we have implemented audio transmission together with WebRTC Raw calls, but without success, we have managed to establish a connection that can transmit audio, but we have not managed to develop a connection to the DataChannel to transmit crucial data, such as "The video is now available" or "The stream has been muted" etc....

What about using other protocol versions?

The reason is simple, all versions lower than 8.0.0 are to be considered neolithic, while versions like 9.0.0 and 10.0.0 are 2 versions completely not recommended and 9.0.0 is also turned off server side, so only the version 11.0.0 and 8.0.0 as possible choices

So.... Now?

Well..... We have created a special branch with the related changes made by me and Vkryl, if you want to take a look and maybe make attempts and possibly compare everything if maybe we mixed something, I'll leave you an index below of the various files.

Files Index (NTgCalls)

Custom WebRTC Calls
Reflector Port
Reflector Relay Port Factory
Instance Networking
Channel Manager
OutgoingAudioChannel
OutgoingVideoChannel
InstanceV2Impl

Files Index (TgX)

Custom WebRTC Calls
Reflector Port
Reflector Relay Port Factory
Instance Networking
Channel Manager
OutgoingAudioChannel
OutgoingVideoChannel
InstanceV2Impl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Common Problems wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants