bsun20 / siphon

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

Siphon dial out via VPN #120

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Activate VPN connection on iPhone (asterisk server is only reachable 
via pptp vpn)
2. Open Siphon and attempt to dial
3. Get pop-up asking to dial with cellular

4. Activate Setting for siphon over 3G/Edge
5. Open Siphone and attempt to dial
6. Call is placed as expected.

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

Would rather not have to enable the 3G/Edge option in siphone when wanting 
to dial out via vpn over wifi. Does enabling the 3G/Edge mode reduce the 
bandwith usage? Voice calls are sounding a little robotic.

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

siphone 20090104-1
iphone 2.2

Please provide any additional information below.

Original issue reported on code.google.com by jeremy.l...@gmail.com on 12 Jan 2009 at 11:03

GoogleCodeExporter commented 9 years ago
Did you ever solve the problem? Thanks Regards,

Original comment by camilo...@gmail.com on 27 Jan 2009 at 4:01

GoogleCodeExporter commented 9 years ago
I don't understand, the behavior is normal.
I defined this behavior because everybody don't want or can't use VoIP on 3G.

Otherwise, I don't know why Siphon doesn't use VPN. Siphon uses Apple's example:
reachibility. Maybe the return value by this code for VPN is specific.

Could you help me to test this feature ?
You can contact me by mail.

Original comment by samuelv0...@gmail.com on 27 Jan 2009 at 9:02

GoogleCodeExporter commented 9 years ago
I'm now back home and don't have the need for the VPN since asterisk is on 
local 
lan. Not sure when I'll have the opportunity to test this again.

Original comment by jeremy.l...@gmail.com on 27 Jan 2009 at 2:01

GoogleCodeExporter commented 9 years ago
If needed, I could help you test the VPN connectivity-issue. My companys 
sip-server
is reachable via vpn.

Original comment by suq...@gmail.com on 28 Jan 2009 at 2:34

GoogleCodeExporter commented 9 years ago
Issue 140 has been merged into this issue.

Original comment by samuelv0...@gmail.com on 1 Feb 2009 at 1:46

GoogleCodeExporter commented 9 years ago
I've had the problem, that using VPN and WiFi i can't connect to my SIP Server, 
since Siphon tries to use the 
public IP to communicate with the SIP server and not the VPN IP.

Any solution to that yet?
I can help test the VPN connection and would be glad to do so!

Original comment by lukas.pi...@gmail.com on 1 Mar 2009 at 5:28

GoogleCodeExporter commented 9 years ago
I have seen that siphone sends the 3G's IP instead of the local IP provided for 
the 
VPN server. It sends the register to my server but it sends the wrong IP, so 
when my 
IP-Pbx is trying to reach it, this is nos posible because the registration IP 
it's 
not and 192.X.X.X ip what siphon sent at the register message.

Any one can help me. Regards.

Original comment by drolda...@gmail.com on 3 Mar 2009 at 5:28

GoogleCodeExporter commented 9 years ago
This lines of code in call.m (Line 252-253) seem to establish the connection:

status = pjsua_transport_create(PJSIP_TRANSPORT_UDP,
          &app_config->udp_cfg, NULL/*&transport_id*/);

Looking into the pjsua_transport_create function, i think, the public ip should 
be passed to it, instead of NULL,
else the pjsua_transport_create takes over to lookup the public ip address, 
which then results in being either 
the 3G or WiFi Gateway, but not the VPN IP.

Maybe this could be solved, if the code checked for the connection being used 
by the iPhone (3G/WiFi/VPN) 
and passes the ip of the matching connection to the pjsua_transport_create 
function.

I'd love to be included in the beta testings to test upcoming Siphon versions 
with my Offices VPN connection

Original comment by lukas.pi...@gmail.com on 8 Mar 2009 at 10:18

GoogleCodeExporter commented 9 years ago
I would also be willing to help test any potential fixes.  I'm running an 
asterisk server that I have to open an L2TP 
VPN connection to in order to use.  Siphon seems to be passing my WiFi IP 
instead of the VPN IP.  Here's a copy 
of my log file from opening Siphon.  After it tries to connect the message 
displayed in the app is "Service 
Unavailable"

Original comment by masicign...@gmail.com on 26 Mar 2009 at 7:43

Attachments:

GoogleCodeExporter commented 9 years ago
Do you have any solution for using it with a VPN and sending the right VNP IP 
address??

Original comment by drolda...@gmail.com on 8 Apr 2009 at 7:19

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:20

GoogleCodeExporter commented 9 years ago
Any status updates on this? I too am having the same problem. If I'm connected 
via
wifi over the vpn, I see in the logs that it is using my Wifi address instead 
of the
VPN. As Lukas was saying it looks like from the code that pjsip is what is 
handling
what IP it should use. Apparently it is picking the wrong one. However, I think 
Lukas
is wrong about the NULL thing (unless we are looking at different version of 
pjsip).
It looks like it can be passed in through the app_config->public_addr which is a
string. According to pjsua.h..

    /**
     * Optional address to advertise as the address of this transport.
     * 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.
     *
     * Note: this option can be used for both UDP and TCP as well!
     */
     pj_str_t       public_addr;

Original comment by danielbl...@gmail.com on 14 Jul 2009 at 4:07

GoogleCodeExporter commented 9 years ago
look issue 225 comment 3 ;-)

Original comment by samuelv0...@gmail.com on 15 Jul 2009 at 12:59

GoogleCodeExporter commented 9 years ago
I am having this same issue, I am willing to do some testing to assist the 
resolution
of this problem.

Thanks for your work! Hopefully we can get this working!

Original comment by jfranc...@gmail.com on 4 Aug 2009 at 4:15

GoogleCodeExporter commented 9 years ago
Same issue, i get connected to the PBX if i enable 3G in Siphon over VPN but no 
voice path though.

Original comment by y...@videotron.ca on 19 Aug 2009 at 8:45

GoogleCodeExporter commented 9 years ago
Does any one has find out a solution for this??

Original comment by drolda...@gmail.com on 31 Aug 2009 at 9:37

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:47

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:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I  downloaded 2.2 rc3 and it's working perfectly on my strongswan vpn server. 
Locally, I only had to define the 
bound ip addr of my iPhone to the vpn tunnel ip address that's it. Here are my 
settings:
- enable EDGE/3G
- define Bound IP Address
- define no public ip address 
- no proxy and no NAT activated

I tested via wifi and via EDGE/3G and it is perfectly running.

Thx 

Original comment by Wobber1...@web.de on 18 Nov 2009 at 10:13

GoogleCodeExporter commented 9 years ago
same here. I download 2.2 rc4. I am not sure how to see the version but it 
still say
it is 2.2.0 under the Settings, Siphon

Here are my settings which is similar with Wobber1 (comment 20)
- enable EDGE/3G
- define Bound IP Address (my VPN IP address)
- did not define public ip address 
- no proxy and no NAT activated

It work.. I tried to on NAT and never define Bound IP, it result no voice

Original comment by kewinw...@gmail.com on 11 Dec 2009 at 4:27

GoogleCodeExporter commented 9 years ago
Is it possible to add a button, 
to turn on/off VPN Bound IP automatically (IP will be getting from VPN IP)

Original comment by kewinw...@gmail.com on 11 Dec 2009 at 4:35

GoogleCodeExporter commented 9 years ago
Y in the next version

Original comment by samuelv0...@gmail.com on 12 Dec 2009 at 6:37

GoogleCodeExporter commented 9 years ago
hi,

i have the same problem but i can not bound the ip address for vpn, because i 
am 
assigned the ip from dhcp everytime i connect. any body can suggest please?

Original comment by mohsin...@gmail.com on 15 Dec 2009 at 9:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
wait the next version ;-) or copy/paste every time or define an ip address for 
your
address mac.

Original comment by samuelv0...@gmail.com on 15 Dec 2009 at 11:12

GoogleCodeExporter commented 9 years ago
Its OK, but how can i know the IP assigned to me by VPN? ofcourse i can bound 
that ip
each type but i dont know how can i find it?

Original comment by mohsin...@gmail.com on 16 Dec 2009 at 9:56

GoogleCodeExporter commented 9 years ago
Hi, I'm trying to use siphone over an OpenVPN tunnel on my Iphone. But it says
"Service not available" 

My settings are:
- enable EDGE/3G
- define Bound IP Address (my VPN IP address)
- did not define public ip address 
- no proxy and no NAT activated

My VPN-IP is 10.8.0.18, ifconfig lists the following:

ppp0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1500
        inet 10.8.0.18 --> 10.8.0.17 netmask 0xffffffff

Accessing a webserver on the vpn server works. Reaching the iphone from the 
server
also. But it looks like no traffic would pass the tunnel :( (asterisk 1.6 and 
"sip
set debug on" shows no packets).

log.txt looks uninteresting:

 15:48:53.777   pjsua_core.c  1 SIP worker threads created
 15:48:53.777   pjsua_core.c  pjsua version 1.4-trunk for arm-apple-darwin9 initialized
 15:48:53.786   pjsua_core.c  SIP UDP socket reachable at 10.8.0.18:5060
 15:48:53.787    udp0x864000  SIP UDP transport started, published address is
10.8.0.18:5060
 15:48:53.788  pjsua_media.c  RTP socket reachable at 10.8.0.18:4000
 15:48:53.788  pjsua_media.c  RTCP socket reachable at 10.8.0.18:4001
 15:48:53.789  pjsua_media.c  RTP socket reachable at 10.8.0.18:4002
 15:48:53.789  pjsua_media.c  RTCP socket reachable at 10.8.0.18:4003
 15:48:53.790 sip_endpoint.c  Module "mod-unsolicited-mwi" registered
 15:49:02.855   pjsua_core.c  Shutting down...

Any ideas?

Original comment by jan.wi...@gmail.com on 27 Jan 2010 at 2:57

GoogleCodeExporter commented 9 years ago
any one with the update please share?

Original comment by mohsin...@gmail.com on 17 Feb 2010 at 8:57

GoogleCodeExporter commented 9 years ago
update still isn't there but to find the vpn ip: type "ifconig" inthe 
mobileterminal and read the last 
line there should be 2 addresses the first one is your ip.

and: btw this just works great, was able to tunnel through to my fritzbox 
router at home and use 
voip ;-) before that there was no voice...
so put this into the next update! =) 

Original comment by user.cra...@gmail.com on 21 Mar 2010 at 9:54

GoogleCodeExporter commented 9 years ago
I am using Siphon 2.2.1a2
I am running an OpenVPN Access Server.

I'm using openvpn from http://github.com/jfx2006/OpenVPN_iphone/downloads

When I start the VPN, all is well. Safari and some applications browse the web 
and 
whatismyip.com shows the VPN ip. Some apps say No Network, but otherwise fine.

Now I have followed every step suggested in the comments.

In each setup 3G set to on

NAT - No Go
VPN IP Bound IP - No Go
VPN IP Bound IP & Public IP No Go
VPN IP Bound IP + DNS = No Go
Public IP Only - No Go
Public IP & DNS = No Go
VPN IP Bound IP + Public IP + DNS = No Go

Is there something I'm missing in my various setup attempts?

Original comment by redpengu...@gmail.com on 26 Mar 2010 at 11:14

GoogleCodeExporter commented 9 years ago
I don't know if I'm missing something that the others have done, but this is 
what I
had to do to finally get it working after at least a week and a half.

Disable NAT
Bound IP set to VPN IP
Over 3G Enabled
Proxy IP (I pointed mine to a GVOut server because I have Google Voice, but 
believe
it can be just the same thing you put in for domain).

The part that seems different than everyone else's is, even after putting in 
the DNS
server manually it never worked.

Until I put the actual IP in for the proxy vs DNS domain, it never would work.

Oddly enough, it seems to connect faster over OpenVPN (OpenVPN Access Server) 
than
over normal WiFI.

Original comment by redpengu...@gmail.com on 7 Apr 2010 at 4:49

GoogleCodeExporter commented 9 years ago
Hi, Where's the "Over 3G/EDGE" option? I'm running Siphon on an iPod Touch.
Thanks!

Original comment by dari...@gmail.com on 13 Apr 2010 at 8:18

GoogleCodeExporter commented 9 years ago
If you use an ipod touch you don't have edge/3G module ;-)
Also you don't have this option ;-)
Buy an iPhone to get this option :-)

To use VPN you don't need edge/3G.

Original comment by samuelv0...@gmail.com on 13 Apr 2010 at 9:11

GoogleCodeExporter commented 9 years ago
Hi Samuel,

I have seen several issues regarding the VPN connection problem and your 
"Public IP 
address" and "Bound IP address" configuration settings. This isn't working with 
my 
OpenVPN setup (latest 2.3.0rc2 from Apr 4th)

It is my belief, and I may of course be wrong, that this approach goes in the 
wrong 
direction.

What I think would be the right approach is:

-- Check the routing table to find out what route will be used to reach the 
server.
-- Once an entry is found, the application should be able to extract the 
interface 
that will be used to route the packet
-- Once the interface is known, the application can use the IP address of the 
interface as the address to show to the SIP registrar.

This approach would work whether a VPN is active or not. Since this approach is 
based 
upon the routing table, it may also work without activating any 3G/Edget 
switch, 
although I can't of course be sure of this.

Best regards and thank you for the application (which of course works when I am 
connected to my WLAN)

Original comment by danj...@gmail.com on 20 Apr 2010 at 8:03

GoogleCodeExporter commented 9 years ago
Hi again,

Adding to my previous message:

-- The route has to be the most specific one (this is automatically delivered 
by the 
kernel)

A shell command that delivers the appropriate information is:

-- route -nv destination_address

Where the last lines of the output have the information:

sockaddrs: <DST,GATEWAY,IFP,IFA>
 192.168.200.2 192.168.200.1 ppp0 192.168.200.1

There we see that the interface address to use would be 192.168.200.1, because 
the 
sought destination address is 192.168.200.2. The gateway and the interface 
address 
may or may not be same, but this is not relevant.

This information can be programmatically retrieved by using the route 
functionality

http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/m
an4/r
oute.4.html#//apple_ref/doc/man/4/route

Best regards

Daniel

Original comment by danj...@gmail.com on 20 Apr 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Hi,

I had the same reported issues but this was fixed with Siphon-2.3rc4.deb. I've 
been using no NAT and no proxy.

Cheers,
Mauricio

Original comment by mzamb...@gmail.com on 18 Jul 2010 at 10:54

GoogleCodeExporter commented 9 years ago
I am having a weird issue now.

I have both an iPhone 2G (3.1.2) and 3G (4.0).

They both run the latest RC 2.3RC4.

Now the 2G always ran Siphon behind an OpenVPN with no problem before except I 
for some reason had to put the proxy in as an IP vs DNS.

Anyway, now, the 3G is working no DNS problem and the 2G refuses to work even 
if I put an IP in.

Both are also connecting to the same OpenVPN Access Server, same scripts to 
connect, same username/password, same static IP given by VPN.

Even reinstaling Siphon, seemed to fail.

Original comment by redpengu...@gmail.com on 23 Aug 2010 at 3:32

GoogleCodeExporter commented 9 years ago
An update to my previous comment, they are even using the same OpenVPN client 
version.

Original comment by redpengu...@gmail.com on 23 Aug 2010 at 3:35

GoogleCodeExporter commented 9 years ago
To anyone who had the problem as my previous 2 comments, not sure what actually 
happened but this is exactly how I solved it.

After figuring out what I haven't tried yet, I completely removed openvpn 
client and rebooted, reinstalled, and rebooted (not sure if this reboot is 
needed but better safe than sorry).

Then before I knew it, finally it connected again and my old DNS problem is 
gone also, where I used to have to put the IP of the proxy vs DNS of it.

Original comment by redpengu...@gmail.com on 25 Aug 2010 at 10:52

GoogleCodeExporter commented 9 years ago
Now I have a similar problem.

My iPhone 3G running 4.2.1 runs OpenVPN fine and I can't seem to find a single 
app that doesn't work over the VPN, including Siphon the latest from the 
free.fr repo.

Yet, when attempting to use 2.3RC4 on my 3.1.3 which I know worked before when 
I was using OpenVPN Access Server, but now I am using the normal OpenVPN, 
things only half work.

What I mean is almost all the apps work except AOL Radio, Softphone, and 
Siphon, yet I know Siphon definitely worked before and I changed no settings 
and the settings are the same as on my 2G.

The route tables all seem the same and so does the interface configs.

Original comment by redpengu...@gmail.com on 14 Oct 2011 at 8:29