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
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.
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
it does use some webrtc tools like ice and stun (afaik), but the actual webrtc impl is non standard. I am not sure tho
grishka left I believe
Обсуждают сегодня