nalio / siphon

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

Wrong VIA/Contact header if connected via VPN #222

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. UMTS/GPRS active
2. Disable WLAN
3. Activate VPN
4. Start siphone

There is a wrong VIA header in the REGISTER/INVITE/... if I connect via VPN.

Receiving datagram with length 432 from 192.168.1.15:5060 to 192.168.1.1:5060
REGISTER sip:192.168.1.1 SIP/2.0\r\n
Via: SIP/2.0/UDP 192.168.1.125:5060;rport;branch=xxxxxx\r\n
Max-Forwards: 70\r\n
From: <sip:37@192.168.1.1>;tag=xxxxxxx\r\n
To: <sip:37@192.168.1.1>\r\n
Call-ID: xxxxxxx\r\n
CSeq: 13919 REGISTER\r\n
User-Agent: Siphon PjSip v1.0.2-trunk/arm-apple-darwin9\r\n
Contact: <sip:37@192.168.1.125:5060>\r\n
Expires: 1800\r\n
Content-Length:  0\r\n
\r\n

192.168.1.15 is my iPhone VPN IP
192.168.1.125 is the IP the iPhone gets in my WLan, not active at the moment 

What is the expected output? What do you see instead?

The VPN IP in both VIA and Contact header (in this case 192.168.1.15).

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

siphon 2.0.8
iPhone 2.2.1

Please provide any additional information below.

Original issue reported on code.google.com by t.steffi...@googlemail.com on 13 Apr 2009 at 11:45

GoogleCodeExporter commented 9 years ago
Do you have the possibility to get trace from iphone (log) and on server ?
If could you post here or send me by mail.

Like that we can see if the problem is caused by server not receiving the 
REGISTER
request or because the REGISTER response is not received by iPhone.

Original comment by samuelv0...@gmail.com on 27 Apr 2009 at 8:22

GoogleCodeExporter commented 9 years ago
Here the relevant part of the iphone log:

23:07:35.069 sip_endpoint.c  Module "mod-pjsua-log" registered
 23:07:35.070 sip_endpoint.c  Module "mod-tsx-layer" registered
 23:07:35.070 sip_endpoint.c  Module "mod-stateful-util" registered
 23:07:35.071 sip_endpoint.c  Module "mod-ua" registered
 23:07:35.072 sip_endpoint.c  Module "mod-100rel" registered
 23:07:35.072 sip_endpoint.c  Module "mod-pjsua" registered
 23:07:35.073 sip_endpoint.c  Module "mod-invite" registered
 23:07:35.075  iphonesound.c  pjmedia_snd_init.
 23:07:35.075  iphonesound.c  pjmedia_snd_init AudioSessionInitialize.
 23:07:35.090          pjlib  select() I/O Queue created (0x880e14)
 23:07:35.092   conference.c  Creating conference bridge with 254 ports
 23:07:35.094   conference.c  Sound device successfully created for port 0
 23:07:35.094 sip_endpoint.c  Module "mod-evsub" registered
 23:07:35.095 sip_endpoint.c  Module "mod-presence" registered
 23:07:35.096        evsub.c  Event pkg "presence" registered by mod-presence
 23:07:35.096 sip_endpoint.c  Module "mod-refer" registered
 23:07:35.096        evsub.c  Event pkg "refer" registered by mod-refer
 23:07:35.096 sip_endpoint.c  Module "mod-pjsua-pres" registered
 23:07:35.097 sip_endpoint.c  Module "mod-pjsua-im" registered
 23:07:35.097 sip_endpoint.c  Module "mod-pjsua-options" registered
 23:07:35.097   pjsua_core.c  1 SIP worker threads created
 23:07:35.097   pjsua_core.c  pjsua version 1.0.2-trunk for arm-apple-darwin9 initialized
 23:07:35.117   pjsua_core.c  SIP UDP socket reachable at 192.168.1.125:5060
 23:07:35.119    udp0x8b2200  SIP UDP transport started, published address is 192.168.1.125:5060

192.168.1.125 was the last Wlan IP, Wlan is shut off and VPN active -IP would 
be 92.168.1.15 here.

Original comment by t.steffi...@googlemail.com on 27 Apr 2009 at 9:27

Attachments:

GoogleCodeExporter commented 9 years ago
I suppose you don't use Backgrounder.
Did you try to use Safari or Mail before to run Siphon, to verify if the 
address is
correct in this case?

Original comment by samuelv0...@gmail.com on 27 Apr 2009 at 9:43

GoogleCodeExporter commented 9 years ago
The VPN connection works for the Things I use e.g. Mail and http to an internal 
server and I don't use 
Backgrounder.

Original comment by t.steffi...@googlemail.com on 27 Apr 2009 at 10:00

GoogleCodeExporter commented 9 years ago
I just release a 2.2 rc1 version. I add two settings :
    * public ip addr : Application can specify any address or hostname for this
field, for example it can point to one of the interface address in the system, 
or it
can point to the public address of a NAT router where port mappings have been
configured for the application.
    * bound ip addr : This option SHOULD only be used to selectively bind the socket
to particular interface (instead of 0.0.0.0), and SHOULD NOT be used to set the
published address of a transport (the public ip addr field should be used for 
that
purpose).

Logically, you just should define bound ip addr with iphone IP on your vpn.
Perhaps you will need to define proxy in advanced settings.
Don't forget to enable 3G/edge options because iPhone OS thinks vpn is always 
WWAN.

I'd like to give us which settings do you use (public and/or bound address, 
proxy...)
and of course if it works or not ;-)

If the tests are positive, I will replace this two settings by switch to enable 
or
not vpn and define automatically these two parameters.

Thx

Original comment by samuelv0...@gmail.com on 5 Nov 2009 at 7:48

GoogleCodeExporter commented 9 years ago
2.2 rc2 is available on http://code.google.com/p/siphon/downloads/list

Original comment by samuelv0...@gmail.com on 7 Nov 2009 at 11:53

GoogleCodeExporter commented 9 years ago
I just tried and with "bound ip addr" set to my VPN IP it works. "public ip 
addr" was left empty.
I didn't configure proxy but was only able to try over WWAN (large delay). 
So I guess if you build in the switch it will know if VPN is active and only 
then change the IP?
With "bound ip addr" set to my VPN IP it doesn't work in my WLAN (what I would 
anticipate).

Original comment by t.steffi...@googlemail.com on 8 Nov 2009 at 9:30