Hello MediaSoup Community,
I’m working on implementing a multi-party video calling feature on my Node.js server using MediaSoup, and I’m encountering an issue with clients connecting from external networks. I’m fairly new to WebRTC concepts, so I may have misunderstood somethings. Please correct me if I’ve missed any key steps or concepts.
Setup Details:
- Video Calling Server (with mediasoup-server library): Running on a VM in my office network. Also by domain name lms.sarjanfoundation.com
- Functionality Goal: Enable multi-party video calling, where users can join from different networks using a URL (BadriLMS), similar to Google Meet.
- TURN Configuration: Using Express TURN on the client side in the ICE servers configuration to support NAT traversal for external connections.
Issue Description:
The functionality works as expected for clients on the same network as the server. They can see and hear each other without any problems. However, when a client tries to join from an external network:
- Video and audio tracks stop transmitting for the external client.
- Clients from the external network cannot see or hear other participants, and vice versa.
Additional Information and Questions:
-
Announced Address: I’m currently using my hostname (
lms.sarjanfoundation.com
) as the announced address, hoping it will point directly to the VM without relying on IPs. However, the stream issue persists for external clients. I’d like to ask if it’s possible to use a domain instead of an IP in theCreateTransportService
configuration to ensure connectivity aligns with the public-facing address. -
Transport Configuration:
a. Config with which video calling works on the clients with the same network as the serverWhen I pass listenInfos as:
"listenInfos": [
{
"ip": "192.1.200.233", // private IP
"announcedAddress": "192.1.200.233"
}
],
createRecvTransport / createSendTransport {
"id": "ee63140f-274a-4cad-ba0e-e0579da06d25",
"iceParameters": {
"usernameFragment": "s72ghfp7arg1koofpsflm4u874p2pxl8",
"password": "y1sarxjt0h6b6eqxzidvwag6tufsz77u",
"iceLite": true
},
"iceServers": [
{
"urls": "stun:stun.l.google.com:19302"
},
{
"urls": "turn:relay1.expressturn.com:3478",
"username": "efQ1D78SW2M6K7RRAT",
"credential": "g8yQsbB8wssh7su9"
}
],
"iceCandidates": [
{
"foundation": "udpcandidate",
"priority": 1076302079,
"ip": "192.1.200.233",
"address": "192.1.200.233", //private IP
"protocol": "udp",
"port": 12091,
"type": "host"
}
],
"dtlsParameters": {...}
}
b. Config that I made for production but doesn’t work at all.
When I pass listenInfos as:
"listenInfos": [
{
"ip": "lms.sarjanfoundation.com", // public hostname that routes to my vm
"announcedAddress": "[192.1.200.233](http://lms.sarjanfoundation.com)"
}
],
createRecvTransport / createSendTransport {
"id": "ee63140f-274a-4cad-ba0e-e0579da06d25",
"iceParameters": {
"usernameFragment": "s72ghfp7arg1koofpsflm4u874p2pxl8",
"password": "y1sarxjt0h6b6eqxzidvwag6tufsz77u",
"iceLite": true
},
"iceServers": [
{
"urls": "stun:stun.l.google.com:19302"
},
{
"urls": "turn:relay1.expressturn.com:3478",
"username": "efQ1D78SW2M6K7RRAT",
"credential": "g8yQsbB8wssh7su9"
}
],
"iceCandidates": [
{
"foundation": "udpcandidate",
"priority": 1076302079,
"ip": "lms.sarjanfoundation.com",
"address": "lms.sarjanfoundation.com", //private IP
"protocol": "udp",
"port": 12091,
"type": "host"
}
],
"dtlsParameters": {...}
}
If anyone has insights on resolving the stream issue for external connections, I’d greatly appreciate the guidance. Thank you!