tulir / whatsmeow

Go library for the WhatsApp web multidevice API
https://go.mau.fi/whatsmeow
Mozilla Public License 2.0
2.09k stars 382 forks source link

Phone Features #555

Open refaldyrk opened 5 months ago

refaldyrk commented 5 months ago

Make a call, reject a call, stream audio on call, is it possible?

arugaz commented 5 months ago

yeah its possible, already create offer and reject call func on my fork, i havent tried to connect it to the relay server since whatsapp announced the deprecation of its electron-based desktop app

gamersindo1223 commented 5 months ago

@arugaz hey can I have the link of your fork? thanks!

refaldyrk commented 5 months ago

@arugaz hey can i have access?

ahmedRSA commented 5 months ago

yeah its possible, already create offer and reject call func on my fork, i havent tried to connect it to the relay server since whatsapp announced the deprecation of its electron-based desktop app

can you open your fork ? or just share code block of call method

ahmedRSA commented 5 months ago

there is nothig here

https://github.com/arugaz/whatsmeow/blob/main/call.go

arugaz commented 5 months ago

i'll make pull request

gamersindo1223 commented 5 months ago

i'll make pull request

@arugaz just send the pr link when u r done

refaldyrk commented 5 months ago

THANK U FOR U CONTRIBUTION @arugaz

7kXTQsyhnySpko6n commented 5 months ago

@arugaz How to make a call offer?

gamersindo1223 commented 5 months ago

@7kXTQsyhnySpko6n try this https://github.com/go-whatsapp/whatsmeow/blob/main/call.go

abaz1997 commented 5 months ago

@arugaz

have you tested making a call offer to another user? the code works for me if I try to send it to my phone from the linked device, but the server silently drops the message if I try to send an offer to anyone else. The other user sometimes receives a token notification so I know the server is receiving the message but its not forwarding it on

Manjit2003 commented 5 months ago

I managed to make calls, the other phone rang but after picking it up, it showed "Connecting" on both devices. Only the WebRTC signaling part is left now I guess

abaz1997 commented 5 months ago

I figured it out, the server drops the call offer if the call key is encrypted using pre-keys. as soon as I responded to a text from the linked device, the session started using DMs and the call worked as intended. i've received calls encrypted with pre keys from phones before, so maybe this is a linked device issue?

ahmedRSA commented 5 months ago

I managed to make calls, the other phone rang but after picking it up, it showed "Connecting" on both devices. Only the WebRTC signaling part is left now I guess

do any library fully support voice call ? has anyone able to successfully make a voice call yet?

abaz1997 commented 5 months ago

no one so far has released a poc for a STUN client afaik

https://github.com/WhiskeySockets/Baileys/issues/40#issuecomment-1549813499

this outlines the steps needed, there's probably more but its a start

gamersindo1223 commented 5 months ago

@abaz1997 there is a version that was working a while back, https://github.com/bhavya32/WA-Calls

gamersindo1223 commented 5 months ago

btw for any1 who wants to reverse engineer the whatsapp uwp you can download it here https://fighter-programmer-uploader.hf.space/file/application-7klwbhx2xak.zip