169 похожих чатов

Hi, does anybody know if there is any documentation available

for Telegram WebRTC? I'm trying to make my own voice calls player yet I'm struggling to figure out how Telegram implemented it. WebRTC is p2p, are Telegram group calls p2p too? My proof of concept is using python aiortc, and I can get it to exchange ICEs with Telegram, but no actual connection happens and DTLS handshakes just timeout

4 ответов

8 просмотров

Well I'm not 100% sure that telegram uses webrtc. I think they use VoIP because its easier to implement E2E encryption on it and webRTC can't efficiently handel group calls because encoding happens at the peers so probably not. And second I don't understand when you say no connection happens, did you mean on the telegram client or the webRTC? Any who your proof of concept sounds solid just create 2 telegram clients using thier pytjon SDKs and get the ICEs and the rest works out like maginc using aiortc.

alemi- Автор вопроса
Пользователь 61a86
Well I'm not 100% sure that telegram uses webrtc. ...

I'm quite sure they switched to it for Group Calls: if you check tgcalls it mentions webrtc, ssrcs, ices and transport here and there. I think too that it's not a "vanilla" webrtc impl, but I don't know how it works and don't really want to reverse engineer tgcalls. libtgvoip seems to be deprecated. About the "no connection happens", I create an offer (and set that as local description) to give telegram as I join the group call, telegram sends me transport information as json (which I parse into an sdp and set it as remote description) and at this point my client and tg should be exchanging ICEs but it just keeps starting over, waiting a little and then the DTLS handshake times out. Wiresharking proper connections, it seems Telegram should be the party to initiate the DTLS handshake, yet that never happens with my code: my client tries to start the handshake (and telegram straight out ignores me). I think this boils down to how Telegram handles the protocol: I am no webrtc expert but I think I did everything right, and yet it fails. I should know more about tg impl to fix that, and I am growing more and more fearful that I'll just have to read tgcalls source code

alemi
I'm quite sure they switched to it for Group Calls...

it does use some webrtc tools like ice and stun (afaik), but the actual webrtc impl is non standard. I am not sure tho

Похожие вопросы

Обсуждают сегодня

А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Где в Астане можно купить мясо для шашлыков?
Dancing Іңұқәһүғө
21
Подскажите, где смотреть результат выполнения программы? Код: ;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, станда...
Егор Анелькин
5
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
Добрый день подскажите пожалуйста может кто то сталкивался с ошибками Sentry 22.10.0 развернутым из helm чарт в Kubernetes? Изначально 3 дня назад очень стало много событий ух...
Tire4 Finist Devops
1
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
почому оно не работает?
Vi Chapmann Chapmann
19
всем привет почти закончил курс После него можно писать свою операционку? Какие библиотеки надо использовать и куда дальше копать для изучения
Linus
19
Так а кто может спарсить всех участников чата? Идишники
Magic
18
Карта сайта