The voice-calling feature is not working
Unanswered
Surfbird posted this in #help-forum
SurfbirdOP
I am working on an R&D project using Next.js, Socket.IO, and WebRTC to implement a voice call feature. However, I'm struggling to establish WebRTC connections and cannot receive data from the caller to the callee.
I would greatly appreciate any expert advice or assistance. If someone can help with this task, I will make sure to value your time and effort. Thank you!
I would greatly appreciate any expert advice or assistance. If someone can help with this task, I will make sure to value your time and effort. Thank you!
29 Replies
Savannah
hey, how can I help, it would be helpful to receive a bit more info, have you gone through the webrtc internals dump on your browser
I've worked with webRTC on a major project of mine before to implement video and voice calling functionalities
@Surfbird also are you sure you're attaching the media stream to the appropriate element
my project also uses socketio btw
SurfbirdOP
@Savannah Can you fix it?
Savannah
i need some more info bro
like your code
SurfbirdOP
Well, listen I just need the voice call functionality, without the video calling feature.
I tried setting up the voice call feature, but I’m unable to establish a connection between the caller and the callee. Could you please help me resolve this issue?
I can demonstrate the exact problem over a meeting if needed. Before that, could you let me know your charges or expectations for fixing this issue?
I tried setting up the voice call feature, but I’m unable to establish a connection between the caller and the callee. Could you please help me resolve this issue?
I can demonstrate the exact problem over a meeting if needed. Before that, could you let me know your charges or expectations for fixing this issue?
SurfbirdOP
@Savannah
@Surfbird Well, listen I just need the voice call functionality, without the video calling feature.
I tried setting up the voice call feature, but I’m unable to establish a connection between the caller and the callee. Could you please help me resolve this issue?
I can demonstrate the exact problem over a meeting if needed. Before that, could you let me know your charges or expectations for fixing this issue?
Savannah
i charge nothing obviously, I just wanna help and I can because I'm experienced, when trying to connect, have you visited this page:
replace brave with whatever chromium browser you're on
for example
this should help you know if the problem is with your webrtc implementation (your signalling server for example, nextjs doesn't support socketio obviously so i assume you have a backend, i'm personally using expressjs)
brave://webrtc-internals/
replace brave with whatever chromium browser you're on
chrome://webrtc-internals
for example
this should help you know if the problem is with your webrtc implementation (your signalling server for example, nextjs doesn't support socketio obviously so i assume you have a backend, i'm personally using expressjs)
and what STUN servers are you using?
const newPeer = new Peer({
initiator,
trickle: true,
stream: localStreamRef.current,
config: {
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:stun.2.google.com:19302' },
{ urls: 'stun:stun.3.google.com:19302' },
{ urls: 'stun:stun.4.google.com:19302' },
{ urls: 'stun:stun.5.google.com:19302' },
i'm using this to initiate the peer connection on my nextjs site
Savannah
so i just need some more clarity on what you're working with, and your setup
if you have a repo link, i'd be able to pinpoint what's causing the connection to fail, or the component/page you're using
SurfbirdOP
That's great, buddy!
I'll briefly describe the actual issue I'm facing.
I'll briefly describe the actual issue I'm facing.
SurfbirdOP
@Savannah
ISSUE:
When I click on the Phone icon on the mentor's (caller) chat page to initiate a call to the mentee (callee), a popup appears indicating that the call is outgoing. But, the mentee's chat page does not show any incoming call popup.
The feature I want is for the mentor to call a mentee. For the users, an outgoing call popup should appear on the mentor's side, and an incoming call popup should appear on the mentee's side. If the mentee accepts/receives the call, both users should be redirected to a voice call room where they can continue the audio call. I can't pinpoint the exact problem.
ISSUE:
When I click on the Phone icon on the mentor's (caller) chat page to initiate a call to the mentee (callee), a popup appears indicating that the call is outgoing. But, the mentee's chat page does not show any incoming call popup.
Savannah
ok, visit the
brave://webrtc-internals
chrome://webrtc-internals
depending on what browser you are on from both devices/browsers that you're using to test
see if the connection is established and there are packets of data being exchanged
brave://webrtc-internals
chrome://webrtc-internals
depending on what browser you are on from both devices/browsers that you're using to test
see if the connection is established and there are packets of data being exchanged
and do you have a backend server, if so, what language/framework is it using and what does it say, is it connecting the two peers?
SurfbirdOP
Front: Nextjs, TypeScript, socketio, webRTC.
Back: Express
This is for the first time im using socket.io/WebRTC.
Back: Express
This is for the first time im using socket.io/WebRTC.
Savannah
ok, can you confirm the first thing I said?
the webrtc-internals page on your browser
go through it after trying to connect between your two peers
SurfbirdOP
Got these for: brave://webrtc-internals/
Savannah
did you try initiating the call?
also check those boxes
for the diagnostics
and add console logging for your backend server to see if signals are being forwarded between peers
SurfbirdOP
nothing happening when clicking on the Phone icon. probably my peer connection setup is wrong