I'm writing this to help those who still not figured out how to resolve this issue.
You need to perform one extra step when the server is behind NAT(network address translation).
You need to configure Kurento to use stun server, which you can get from the link kurento documentation,
you need to edit /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
and uncomment and assign values for stunServerAddress
and stunServerPort
.
For example, to use the STUN server at 64.233.177.127
with port 19302
, edit the lines with stunServerAddress and stunServerPort as follows:
stunServerAddress
=64.233.177.127stunServerPort
=19302
edit /opt/freeswitch/conf/sip_profiles/external.xml
and ensure the value for wss-binding uses the external IP address
<param name="wss-binding" value="EXTERNAL_IP_ADDRESS:7443"/>
At this point, restart your BigBlueButton server with bbb-conf --restart
, then try connecting to the WebRTC media again.
If the issue stile not resolved then edit the following files and substitute EXTERNAL_IP_ADDRESS for the external IP address (not the external hostname).
Edit /opt/freeswitch/conf/vars.xml
, and
change <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/>
To <X-PRE-PROCESS cmd="set" data="external_rtp_ip=EXTERNAL_IP_ADDRESS"/>
Change <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/>
To <X-PRE-PROCESS cmd="set" data="external_sip_ip=EXTERNAL_IP_ADDRESS"/>
Next, edit /opt/freeswitch/conf/sip_profiles/external.xml
and change<param name="ext-rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
to<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
Next, edit /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties
, and make sure the values of bbb.sip.app.ip
and freeswitch.ip
have the internal IP address.
bbb.sip.app.ip=<internal_ip>
bbb.sip.app.port=5070
freeswitch.ip=<internal_ip>
freeswitch.port=5060
Edit /etc/bigbluebutton/nginx/sip.nginx
to connect to the external IP address.
If you have configured SSL, use port 7443:
location /ws {
proxy_pass https://EXTERNAL_IP_ADDRESS:7443;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_read_timeout 6h;
proxy_send_timeout 6h;
client_body_timeout 6h;
send_timeout 6h;
}
If enableListenOnly is set to true in /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
, as in
$ grep enableListenOnly /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
enableListenOnly: true
edit /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml
change the value to ip
to match the external IP address of the server, and the value of sip_ip
to match the internal IP address of the server (where FreeSWITCH is listening to port 5066). For example, if the servers external IP address is 203.0.113.1
and the internal IP address is 172.30.1.145
then edit default.yml and change the values for ip and sip_ip as follows:
freeswitch:
ip: 203.0.113.1
sip_ip: 172.30.1.145
port: 5066
After making the above changes, restart BigBlueButton.
$ bbb-conf --restart
external ip->public ip
internal ip->private ip
please check it your firewall settings too