WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
4.13k stars 1.39k forks source link

Calls support #40

Open billantony opened 1 year ago

billantony commented 1 year ago

Before adding this issue, make sure you do the following to make sure this is not a duplicate:

  1. Search through the repo's previous issues
  2. Read through the readme at least once
  3. Search the docs for the feature you're looking for

I am interested in handling incoming voice calls on WhatsApp programmatically.

Receive incoming WhatsApp calls Answer the call Receive streaming data and send data back simultaneously in a bidirectional connection End the call

erickythierry commented 1 year ago

up

Guilherme-j10 commented 1 year ago

up

Auties00 commented 1 year ago

Before adding this issue, make sure you do the following to make sure this is not a duplicate:

  1. Search through the repo's previous issues
  2. Read through the readme at least once
  3. Search the docs for the feature you're looking for

I am interested in handling incoming voice calls on WhatsApp programmatically.

Receive incoming WhatsApp calls Answer the call Receive streaming data and send data back simultaneously in a bidirectional connection End the call

you can't do that currently, we are working on it

ripreal commented 1 year ago

I have noticed that sending voice call is possible to implement. But what to do next i do not understand

{ "tag": "call", "attrs": { "to": { "_jid": { "type": 1, "user": "1234567890", "device": 0, "domainType": 0 } }, "id": "5223.12338-39" }, "content": [ { "tag": "relaylatency", "attrs": { "call-id": "0DDBB7F053B6361A9A0A9F5369F6D5D7", "call-creator": { "_jid": { "type": 1, "user": "1234567890123", "device": 9, "domainType": 0 } } }, "content": [ { "tag": "te", "attrs": { "latency": "33554930" }, "content": { "0": 157, "1": 240, "2": 205, "3": 62, "4": 13, "5": 150 } }, { "tag": "destination", "attrs": {}, "content": [ { "tag": "to", "attrs": { "jid": { "_jid": { "type": 1, "user": "1234567890", "device": 0, "domainType": 0 } } }, "content": null }, { "tag": "to", "attrs": { "jid": { "_jid": { "type": 1, "user": "1234567890", "device": 29, "domainType": 0 } } }, "content": null } ] } ] } ] }

Auties00 commented 1 year ago

I have noticed that sending voice call is possible to implement. But what to do next i do not understand

{ "tag": "call", "attrs": { "to": { "_jid": { "type": 1, "user": "1234567890", "device": 0, "domainType": 0 } }, "id": "5223.12338-39" }, "content": [ { "tag": "relaylatency", "attrs": { "call-id": "0DDBB7F053B6361A9A0A9F5369F6D5D7", "call-creator": { "_jid": { "type": 1, "user": "1234567890123", "device": 9, "domainType": 0 } } }, "content": [ { "tag": "te", "attrs": { "latency": "33554930" }, "content": { "0": 157, "1": 240, "2": 205, "3": 62, "4": 13, "5": 150 } }, { "tag": "destination", "attrs": {}, "content": [ { "tag": "to", "attrs": { "jid": { "_jid": { "type": 1, "user": "1234567890", "device": 0, "domainType": 0 } } }, "content": null }, { "tag": "to", "attrs": { "jid": { "_jid": { "type": 1, "user": "1234567890", "device": 29, "domainType": 0 } } }, "content": null } ] } ] } ] }

as i said it's possible, but it still needs to be implemented as it's a very complex issue

edgardmessias commented 1 year ago

There are two parts to work with calls: the websocket commands and the WebRTC connection.

I am able to understand how to offer or accept a call, but the WebRTC connection is the problem.

They use a full customized version of pjsip.

The code that I did to offer a call, without connecting: https://github.com/wppconnect-team/wa-js/blob/00abf6bfe42424a3dc126b06bd11e8ba50e1888b/src/call/functions/offer.ts#L70

edgardmessias commented 1 year ago

The steps:

ripreal commented 1 year ago

@edgardmessias cool. But i did not find in code https://github.com/wppconnect-team/wa-js/blob/00abf6bfe42424a3dc126b06bd11e8ba50e1888b/src/call/functions/offer.ts#L70 proto like this. Are you using it? ` interface ICall {

        /** Call callKey */
        callKey?: (Uint8Array|null);

        /** Call conversionSource */
        conversionSource?: (string|null);

        /** Call conversionData */
        conversionData?: (Uint8Array|null);

        /** Call conversionDelaySeconds */
        conversionDelaySeconds?: (number|null);
    }

`

edgardmessias commented 1 year ago

@ripreal probally this proto is a part of puzzle to solve

clairton commented 1 year ago

+1

badereddineqodia commented 1 year ago

+2

WeberIT commented 1 year ago

+3

atm i have absolutely no time but ill be in the boat if i can get some free time

zhinea commented 1 year ago

+4

clairton commented 1 year ago

https://github.com/bhavya32/WA-Calls

Pulij commented 10 months ago

https://github.com/bhavya32/WA-Calls

don't work:(

Keito-Klein commented 9 months ago

Before adding this issue, make sure you do the following to make sure this is not a duplicate:

  1. Search through the repo's previous issues
  2. Read through the readme at least once
  3. Search the docs for the feature you're looking for

I am interested in handling incoming voice calls on WhatsApp programmatically.

Receive incoming WhatsApp calls Answer the call Receive streaming data and send data back simultaneously in a bidirectional connection End the call

I interested too, but i want reject that call when receive incoming Whatsapp call. I've tried various methods but still can't find the function.

gamersindo1223 commented 8 months ago

is there any update?

ahmedRSA commented 8 months ago

any update on this?

irux commented 5 months ago

Any new findings on this?

erickythierry commented 5 months ago

Any new findings on this?

There probably won't be anything else coming out about this (at least not here) since those mainly responsible for this adaptation ended up leaving the project due to legal notice from Meta

Mangaka-bot commented 2 months ago

What's new? Any updates on this issue?

Pulij commented 2 months ago

What's new? Any updates on this issue?

No:(

erickythierry commented 2 months ago

What's new? Any updates on this issue?

There is a Brazilian company that managed to make it work (with the help of the current main maintainer of Baileys) wavoip

billantony commented 2 months ago

You can explore this library https://github.com/rs-company-project/wavoip-api

billantony commented 2 months ago

You can integrate it into Baileys, it works well

gamersindo1223 commented 2 months ago

You can integrate it into Baileys, it works well

But looks like it's a service.

Guilherme-j10 commented 2 months ago

You can integrate it into Baileys, it works well

But looks like it's a service.

yep its a service, and u need pay to use

kabaweb commented 1 month ago

Regarding this information, is it possible to replicate it and then leave it in an open project? From what I understand, communication is a point with socket.io to then communicate with asterix?

ahmedRSA commented 3 weeks ago

You can explore this library https://github.com/rs-company-project/wavoip-api

this is paid, no point sharing paid services to a free to use library community