hi, i have Asterisk sarver with real IP without firewall. I use X-Lite to connect to sarver. It is OK. X-Lite is behind the firewall with dynamic IP. When I make a call everithing is OK, but I can’t hear a sound. What is the prblem? In sip.conf I put the “nat=yes”
in x-lite, first turn on ‘transmit silence’.
then enable STUN. stun.xten.net should work… see if that helps?
The problem is not in the X-lite. I use different softphone and the problem persist. When I make a call the other side receive, but X-lite still continue to ring and don’t understand that the call is begin. IF X-lite is behind the Asterisk everithing is OK.
i agree xlite itself is not the problem- however the way it’s interacting with your network is.
The problem is the way NAT and SIP work. With NAT, your one IP address is ‘shared’ among the many clients (with private IPs like 192.168) on your network. The router remembers which connections are open to which clients and reformats the packets accordingly, rewriting the ‘to’ and ‘from’ addresses as needed.
Problem si that SIP sends its own IP address INSIDE the packet, not just as the to/from address. This can cause audio problems because the server cant send audio to 192.168.whatever over the internet.
Thus you have STUN- it tells the client what its external IP address is and more importantly what kind of NAT you have going (there are flavors) so the client can make itself work better with the NAT. STUN identifies the networks external IP, and x-lite puts THAt ip into the SIP packet instead of what it sees itself as.
Thus the correct IP is reported to the * server and the call goes through with audio flowing correctly.
This issue is a limitation of SIP and the way SIP/NAT interact, not x-lite. however STUN can fix it.
Also, you turn on ‘transmit silence’ because Asterisk does not correctly handle VAD type stuff where audio stops coming in when you do not talk. Asterisk requires a constant audio stream even if you are not saying anything, so with transmit silence turned on x-lite will continue to generate audio frames and send them, even if they do not contain any audio.