Mediasoup audio and video works on local enviroment but dosent work on remote server

audio and video works in local enviroement but dosent work in remote enviroment. im using public ip and i have enabled tcp and udp port. below is my configuration

const config = {
port:8009,
rtcMinPort: 40000,
rtcMaxPort: 50000,
listenIps:[
{

         ip: '0.0.0.0', 
         announcedIp: '202.51.1.167', 
      }
],

}

please help.

This mostly happens when either server’s public ip or the desired ports are not open to public. So double check if the ip, ports are correctly mentioned and are open to public.

On chrome go to chrome://webrtc-internals and there you will see all the details about icecandidates etc and from there you can guess the root cause of the issue.

im getting ice connection error.

Yes, you are not able to make connection with the server which indicates that either server’s ip or ports are not reachable, talk to the server guy and make sure these things are open to public.