Coder Social home page Coder Social logo

Calls support about baileys HOT 20 OPEN

whiskeysockets avatar whiskeysockets commented on September 18, 2024 17
Calls support

from baileys.

Comments (20)

edgardmessias avatar edgardmessias commented on September 18, 2024 3

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

from baileys.

badereddineqodia avatar badereddineqodia commented on September 18, 2024 2

+2

from baileys.

edgardmessias avatar edgardmessias commented on September 18, 2024 1

The steps:

  • Socket: Send a offer call
    • Response: {rte: <some ip:port>, key: <base64>, relay: {te2:<ip:port>, token}[]}
  • Nodejs: Process the response and get the ice/stun servers and token
  • WebRTC: Send a customized STUN request to make a NAT connection
    • Custom attribute 0x4000: Maybe part of token
    • XOR-RELAYED-ADDRESS: ip of server
    • MESSAGE-INTEGRITY: HMAC-SHA1 of message
  • WebRTC: Send a customized STUN request to PING
    • Custom attribute: 0x4002 or 0x4003
  • Nodejs: Get the timming of response for each server
  • Socket: Send a relaylatency with the timming of ping
  • ... to find out yet

from baileys.

erickythierry avatar erickythierry commented on September 18, 2024

up

from baileys.

Guilherme-j10 avatar Guilherme-j10 commented on September 18, 2024

up

from baileys.

Auties00 avatar Auties00 commented on September 18, 2024

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

from baileys.

ripreal avatar ripreal commented on September 18, 2024

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 } ] } ] } ] }

from baileys.

Auties00 avatar Auties00 commented on September 18, 2024

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

from baileys.

ripreal avatar ripreal commented on September 18, 2024

@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);
    }

`

from baileys.

edgardmessias avatar edgardmessias commented on September 18, 2024

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

from baileys.

clairton avatar clairton commented on September 18, 2024

+1

from baileys.

WeberIT avatar WeberIT commented on September 18, 2024

+3

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

from baileys.

zhinea avatar zhinea commented on September 18, 2024

+4

from baileys.

clairton avatar clairton commented on September 18, 2024

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

from baileys.

Pulij avatar Pulij commented on September 18, 2024

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

don't work:(

from baileys.

Keito-Klein avatar Keito-Klein commented on September 18, 2024

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.

from baileys.

gamersindo1223 avatar gamersindo1223 commented on September 18, 2024

is there any update?

from baileys.

ahmedRSA avatar ahmedRSA commented on September 18, 2024

any update on this?

from baileys.

irux avatar irux commented on September 18, 2024

Any new findings on this?

from baileys.

erickythierry avatar erickythierry commented on September 18, 2024

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

from baileys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.