pgaval / red5phone

Automatically exported from code.google.com/p/red5phone
0 stars 0 forks source link

getLocalHostAddress always get 127.0.0.1 in linux #155

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run the red5phone APP in linux OS, and RED5 listen to an IP instead of just 
the loopback IP. 
2. the IP in SDP from red5phone is always 127.0.0.1

What is the expected output? What do you see instead?
If the server is listen to a external IP address instead of loopback IP, the IP 
in SDP should be the exteranl IP instead of loopback IP.

What version of the product are you using? On what operating system?
sip_r53. Linux OS.

Please provide any additional information below.
In SipProvider.java#init(), getLocalHostAddress is called to populate 
via_address with the local listening IP. getLocalHostAddress works well in 
windows OS, while it always get loopback IP in linux.
In SdpUtil.java#createInitialSdp()#98, via_address is used to populate the 
address in the SDP offer.
So for linux OS, 127.0.0.1 is always used in SDP. If the SIP phone runs in a 
diff server with what run the red5phone, there'll be problem in RTP path.

Original issue reported on code.google.com by zhangjun...@gmail.com on 11 Jun 2011 at 2:12