gcode-mirror / telephone

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

telephone behind NAT using the wrong ip address in headers and SDP #187

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. the messages headers and the SDP contains my private ip instead of the
public one. 
2. i used:
defaults write com.tlphn.Telephone TransportPublicHost myPublicIP  and now
the headers look correct , however the SDP still has the private ip 
3. Hence no audio since the rtp stream does not open correctly

What is the expected output? What do you see instead?
it would be nice if when using the option:
defaults write com.tlphn.Telephone TransportPublicHost <IP address or host
name>

this also affect the ip in the SDP. so the ausio can work as well

What version of the product are you using? On what operating system?

10.14 , pjsip 1.0.3

is there a workaround for this????
Please provide any additional information below.

Original issue reported on code.google.com by chilote....@gmail.com on 5 Aug 2009 at 8:47

GoogleCodeExporter commented 9 years ago
Are you using your own server or some SIP provider?

Original comment by eofs...@gmail.com on 5 Aug 2009 at 8:50

GoogleCodeExporter commented 9 years ago
I have the Telephone in a private network then connected via  airport extreme 
to the
wan  network (public side). 

Original comment by chilote....@gmail.com on 5 Aug 2009 at 9:00

GoogleCodeExporter commented 9 years ago
I mean what SIP provider are you using? In most cases you don't have to set 
TransportPublicHost, because NAT 
traversal will be done in some other way. For example, you might want to use 
provider's STUN server to 
determine your external IP address. And some providers solve NAT problem 
without any modifications from the 
user's standpoint.

Original comment by eofs...@gmail.com on 5 Aug 2009 at 9:04

GoogleCodeExporter commented 9 years ago
I understand that. In my case i dont have provider, we are connecting to another
company's VOIP switch via a vpn connection and my laptop happens to be  behind 
a NAT.

In general, I think it would be a great enhancement if Telephone can configure 
the
address you want to use for signaling and media, this will make it more 
flexible. 

thank you

Original comment by chilote....@gmail.com on 5 Aug 2009 at 11:33

GoogleCodeExporter commented 9 years ago
Oh, I see what you mean. Telephone relies on pjproject on that. Last time I 
checked, they didn't have such 
feature. I'll check again and I will have that in mind in the future.

But are you sure that in your case there are no any other ways from the 
server-side to solve the NAT problem? 
nat = yes in case of Asterisk, or something?

Original comment by eofs...@gmail.com on 6 Aug 2009 at 8:51

GoogleCodeExporter commented 9 years ago
True. if i use Asterisk it will solve my problem.

Original comment by chilote....@gmail.com on 6 Aug 2009 at 12:44

GoogleCodeExporter commented 9 years ago
This seems like the same issue I have. I previously evaluated VMWare Fusion, 
and thus
got several vmnetX (where X is a number) network interfaces. When Telephone 
starts
up, it seems to randomly select an interface for media, which sometimes mean 
that in
the SDP it will announce the vmnetX interface, which is equipped with a private
address (192.168.XXX.YYY) and thus not accessible from the outside.

The SIP messages always seemed to originate on my public address though.

I realize that the proper way to deal with this immediately is to remove VMWare
Fusion, and I have now done so, but I still consider this a bug in Telephone.

I use Telephone 0.14.3.

Original comment by ingemar....@gmail.com on 27 Jan 2010 at 3:27

GoogleCodeExporter commented 9 years ago
In my case I see the same issue, notably, this is how Telephone registers 
against the SIP server (crud omitted):

        Contact: "Mike" <sip:xxxx@169.254.82.31:5060>
            Contact Binding: "Mike" <sip:xxxx@169.254.82.31:5060>
                URI: "Mike" <sip:xxxx@169.254.82.31:5060>
                    SIP Display info: "Mike"
                    SIP contact address: sip:xxxx@169.254.82.31:5060

Note that Telephone is picking up the IP address of a non-configured or 
disabled adapter, in this case en0 (my Airport card). Inbound calls are not 
working, 
outbound are fine.

As comparison with a client that works, this is how Zoiper registers:

        Contact: <sip:xxxx@10.0.0.2:5060;rinstance=c9cb123fd135356b;transport=UDP>
            Contact Binding: <sip:xxxx@10.0.0.2:5060;rinstance=c9cb123fd135356b;transport=UDP>
                URI: <sip:xxxx@10.0.0.2:5060;rinstance=c9cb123fd135356b;transport=UDP>
                    SIP contact address: sip:xxxx@10.0.0.2:5060

Note that I believe the bug may be in the server, as it could be mistaking the 
169. address as a valid WAN address, but correctly identifying the 10. address 
as a LAN 
address and thus using the public IP instead. I'm not using STUN, and have a 
fixed public IP on a Cisco router with NAT setup.

Original comment by puch...@gmail.com on 8 Feb 2010 at 8:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Still an issue with v0.15.2 (MacOS 10.6.5) when using OpenVPN. The "defaults 
write com.tlphn.Telephone TransportPublicHost" gets the contact address correct 
now, but the SDP message still has my WLAN (en1) address:

-----------------------------------------------
  To: <sip:999@10.0.0.11> SIP to address: sip:999@10.0.0.11
  SIP to address User Part: 999
  SIP to address Host Part: 10.0.0.11 Contact: "me" <sip:123@10.1.1.1:65193>
  SIP Display info: "me" Contact-URI: sip:123@10.1.1.1:65193
[...]
Content-Type: application/sdp
Content-Length: 453 Message Body
Session Description Protocol Session Description Protocol Version (v): 0 
Owner/Creator, Session Id (o): - 3501394798 3501394798 IN IP4 192.168.0.103
Owner Username: - Session ID: 3501394798 Session Version: 3501394798 Owner 
Network Type: IN Owner Address Type: IP4 Owner Address: 192.168.0.103
Session Name (s): pjmedia Connection Information (c): IN IP4 192.168.0.103
Connection Network Type: IN Connection Address Type: IP4 Connection Address: 
192.168.0.103
-----------------------------------------------

Since another client (Zoiper) on the same computer, connecting through the same 
VPN to the same server (Asterisk PBX 1.6.2.8) is working fine, I suspect 
telephone to be mistaken here, no?

Original comment by ckujau on 15 Dec 2010 at 6:59

GoogleCodeExporter commented 9 years ago
Is this issue solved?

Original comment by anze.mar...@gmail.com on 19 Mar 2012 at 6:34

GoogleCodeExporter commented 9 years ago
I am still seeing this issue. Telephone.app is using my local IP address rather 
than the one on the VPN.

From: "jwilde" <sip:8520@10.128.3.11>;tag=rfVV0iBvvdoIiDMUu68gB8xwQEzMK-LJ
To: "jwilde" <sip:8520@10.128.3.11>
...
Contact: "jwilde" <sip:8520@192.168.5.234:52711;ob>

Original comment by ja...@dimsumlab.com on 7 Jun 2012 at 8:43