Current ip address detection algorithm is pretty simple and doesn't work if the device is in the vpn tunnel, for example a user has established the openvpn connection using openvpn/tun.ko combination. The case is, the first interface's ip address is being returned, and we fail to even register on a SIP server. This is a pretty common error on many android SIP clients, check out the same error on csipsimple (http://code.google.com/p/csipsimple/issues/detail?id=390) or sipdroid (http://code.google.com/p/sipdroid/issues/detail?id=368#c10) Attached is the patch fixing the issue for imsdroid, at least now it worked on my phone. I make a map of interface/ip address pair and see if tun0 interface is present - it means we are on vpn. Then the vpn address is being returned, otherwise I just pick up any present ip address. Rather dumb solution, but at least it works well.
- patch_openvpn_tunnel.txt 2.02KB
Comment #1
Posted on Apr 12, 2011 by Swift CatThanks for the patch. IMSDroid v1.x is now frozen. The issue is fixed in IMSDroid v2.x. The source code of v2.x is under "branches/2.0". You MUST uninstall v1.x before trying the v2.x. Appreciate any feedback.
Comment #2
Posted on Apr 12, 2011 by Swift CatFor information, the NetworkService is now part of "android-ngn-stack" project. http://code.google.com/p/imsdroid/source/browse/branches/2.0/android-ngn-stack/src/org/doubango/ngn/services/impl/NgnNetworkService.java#138
Comment #3
Posted on Apr 13, 2011 by Quick LionI've checked your latest changes to the code and see that you've implemented the patch in 2.x with slight modification for better code clearance. Good!
Comment #4
Posted on Jul 13, 2011 by Swift Cat(No comment was entered for this change.)
Comment #5
Posted on Nov 22, 2012 by Massive WombatIMSDroid 2.0.509 (opengl-es 2.0, libyuv) 仍然无法与openvpn一起工作,但我用sipdroid可以和openvpn一起工作
Status: Fixed
Labels:
Type-Defect
Priority-Medium