问题
It is very interesting that I can actually make a mVoIP service from the scratch. I finally could make a call using OpenSIPs source through SIP protocol. I used external STUN server that helps me to find users' private IP address behind NAT firewalls.
However, the free external STUN server cannot find user's IP address to make a call when a smartphone is on 3G or 4G network. As a programmer, I won't give up to make a mVoIP service. However, I need a help at this time from you guys.
Is there a good way to solve this problem? Thank you.
回答1:
There can be two problems here:
-you can't find the correct external address behind all kind of NAT. This depends on the NAT type only
-some mobile operators blocks STUN. You can add some modified stun or a simple encryption as a workaround
回答2:
I actually could find IP address using external STUN server, however it failed to connect media session on 3G/4G network. So, I decided to use RTP proxy to make a SIP call.
OpenSIPs provides RTP proxy module, and it helps to make a call without NAT issue.
来源:https://stackoverflow.com/questions/21155888/a-stun-and-turn-server-that-work-under-3g-4g-network