Comments (20)
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.
+2
from baileys.
The steps:
- Socket: Send a offer call
- Response:
{rte: <some ip:port>, key: <base64>, relay: {te2:<ip:port>, token}[]}
- Response:
- 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.
up
from baileys.
up
from baileys.
Before adding this issue, make sure you do the following to make sure this is not a duplicate:
- Search through the repo's previous issues
- Read through the readme at least once
- 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.
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.
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.
@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.
@ripreal probally this proto is a part of puzzle to solve
from baileys.
+1
from baileys.
+3
atm i have absolutely no time but ill be in the boat if i can get some free time
from baileys.
+4
from baileys.
https://github.com/bhavya32/WA-Calls
from baileys.
don't work:(
from baileys.
Before adding this issue, make sure you do the following to make sure this is not a duplicate:
- Search through the repo's previous issues
- Read through the readme at least once
- 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.
is there any update?
from baileys.
any update on this?
from baileys.
Any new findings on this?
from baileys.
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)
- How to stop the client asking for scanning QR Code
- Request Features Get All Chats and Get All Contact from Contacts and Groups
- [BUG] make-in-memory-store.ts missing contact names
- [BUG] reason: Error: bad-request client.profilePictureUrl() HOT 7
- [BUG] error bad-request when I try to get the profilePicture with profilePictureUrl("[email protected]") HOT 3
- [BUG] "waiting for message" resend issue. HOT 2
- [BUG] profilePictureUrl stop working since Jul.03 HOT 2
- [BUG] Connecting sessions to server HOT 2
- [BUG] Keeps Reconnecting Infinity Loop HOT 2
- [BUG] qrcode not printing because 405 error HOT 5
- [BUG] Session Keep Disconected HOT 1
- [BUG] error 428 Connection Closed when sending message to group HOT 2
- [BUG] Sending messages and listeners stop working HOT 2
- [BUG] Bad decrypt
- [BUG] Get profile picture url is broken HOT 7
- [BUG] commentMessage is not supported in the community HOT 6
- How to receive calls? HOT 1
- why error : Unterminated string in JSON HOT 2
- Error -> Request Time-out HOT 3
- [BUG] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baileys.