Open vaheed opened 3 years ago
If ports are open and working then ICE probably failed. Is ICE configured on Asterisk? Is NAT correctly set on Asterisk? are regular IP/mobile phones able to work? In your INVITE, does the SIP message advertise the correct IP for audio, on the client and for the corresponding server?
I try to test in the local network and everything works fine, but when I use behind the nat no sound I try to DMZ(all public ports nat to local PBX) for the test but no sound again
Is ICE configured on Asterisk?
/etc/asterisk/sip_custom.conf
icesupport=yes
stunaddr=stun.l.google.com:19302
Is NAT correctly set on Asterisk
DMZ(all public ports nat to local PBX)
are regular IP/mobile phones able to work?
Yes, sip phone work behind the nat
does the SIP message advertise the correct IP for audio, on the client, and for the corresponding server?
try to find sip debug and find my client IP address
It's not necessary to put your server in the DNZ, and actually i'm not sure it will help in any case.
Make sure your websocket transport is well defined.
[wss_transport]
type=transport
protocol=wss
bind=0.0.0.0
external_media_address = YOUR.LIVE.IP.ADDRESS
external_signaling_address = YOUR.LIVE.IP.ADDRESS
tos = cs3
cos = 3
local_net = YOUR.LOCAL.LAN.NETWORK/24
Then make sure you use the wss_transport in your endpoint.
...
transport = wss_transport
...
I know this is not necessary, but when working in my local nat and not work when behind nat, I try to test, and yes will NOT help :(
as I know this configuration using PjSIP, but in my project, I try to lunch WebRTC for my SIP clients, not PjSIP clients
Well, you could rule out RTP as the issue if you enable RTP debug... then you could see packets being sent/received etc.
If you are getting packets, and it's not a NAT issue, then it could be something like the microphone or speakers... and lastly, it could be the opus codec. In same cases opus gets corrupted in Asterisk, and appears to be working but is just transmitting silence.
chan_sip also has nat configuration https://github.com/asterisk/asterisk/blob/master/configs/samples/sip.conf.sample
thanks, dear, my problem is now solved.
for your time to help me, I share the steps to run your WebRTC phone on issabel 2020 - asterisk 16 if anyone needs to start an amazing WEBPhone on issablePBX :)
ISSABEL Configuration :
if you want real HTTPS install certbot with this command and get it
yum install epel-release ``yum insall certbot -y ``certbot certonly --standalone -d pbx.example.com
IssabelPBX Advanced Settings Webinterface Certificate file: /etc/letsencrypt/live/pbx.example.com/fullchain.pem Enable HTTPS support for the mini-HTTP Server: True Enable Static Content: False Enable the mini-HTTP Server: False HTTP Bind Address: 0.0.0.0 HTTP Bind Port: 8088 HTTPS Bind Address/Port: 0.0.0.0:8089 Private key file: /etc/letsencrypt/live/pbx.example.com/privkey.pem
Create a SIP WebRTC extention in Webinterface (all defualt) + enable rtcp_mux
Edit RTP in Terminal
vi /etc/asterisk/rtp_custom.conf
[general]
rtpstart=10000
rtpend=20000
rtpchecksums=no
dtmftimeout=3000
rtcpinterval=5000
strictrtp=no
icesupport=yes
stunaddr=stun.l.google.com:19302
[ice_host_candidates]
xx.xx.xx.xx (local ip) => xx.xx.xx.xx (public ip)
Reload Asterisk in web or terminal :)
yum install git -y ``git clone https://github.com/InnovateAsterisk/Browser-Phone.git
cp -rfv Browser-Phone/Phone /var/www/html/Phone
Router Configuration: Forward port TCP 8089 TCP 443 UDP 10000-20000
hey dear and thanks for a great job :)
I try test WebPhone on issabel behind the whitelist firewall and nat and no sound on both side
I try to accept 8089 and 443 TCP and 10000-20000 UDP and forward this port to my issablePBX, can you tell me what exactly needs to forward and accept behind the firewall or any guide for my problem :)