MarshalX / tgcalls

Voice chats, private incoming and outgoing calls in Telegram for Developers
https://t.me/tgcallslib
GNU Lesser General Public License v3.0
515 stars 91 forks source link

Private incoming and outgoing calls #19

Open MarshalX opened 3 years ago

MarshalX commented 3 years ago

The entire cryptographic part of the project is ready. There is a demo of the implementation. It is necessary to rewrite it to clean code and add it to the library.

Demo of private calls: https://github.com/MarshalX/tgcalls/blob/master/pytgcalls/test.py

Currently, the ability to play from a file has not been added. Audio devices only

ZyxEforce commented 1 year ago

when i run the example Demo of private calls ,has the error 'Client' object has no attribute 'send'" ,could you help me

MarshalX commented 1 year ago

@ZyxEforce rollback your pyrogram version to 1.4.x version

huco95 commented 1 year ago

I have managed to make a call using this demo but it keeps showing "Exchanging encription keys". It should be managed by process_update I suppose but it's not being triggered, how can I fix this? Thanks!

    await client2.start()
    outgoingCall = OutgoingCall(client=client2, user_id='@hucoo')
    print(outgoingCall.state)
    await outgoingCall.request()
MarshalX commented 1 year ago

Hi. I don't support this demo, but, do you try to register the handler on init and print values?

something like

@outgoingCall.on_init_encrypted_call
async def process_call(call: Call):
    print('Outgoing call: ', call.auth_key_visualization)
    print(call.call.connections)
pablodgonzalez commented 1 year ago

I have managed to make a call using this demo but it keeps showing "Exchanging encription keys". It should be managed by process_update I suppose but it's not being triggered, how can I fix this? Thanks!

    await client2.start()
    outgoingCall = OutgoingCall(client=client2, user_id='@hucoo')
    print(outgoingCall.state)
    await outgoingCall.request()

Hi @huco95, could you make the private call works? I'm working on it in my free time and I got block in the "Exchanging encription keys" too.