OpenVPN stays connected on iOS with Bria VOIP. How?

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
afriedman
OpenVpn Newbie
Posts: 3
Joined: Thu Nov 03, 2016 2:44 pm

OpenVPN stays connected on iOS with Bria VOIP. How?

Post by afriedman » Thu Nov 03, 2016 2:47 pm

We have been using OpenVPN Connect on iOS for our project and have a requirement for the VPN to stay connected even when the phone is sleeping. This has been a major sticking point for us and we were thinking about switching to an IKEv2 solution to comply with Apple requirements for Always-On VPN. However, we noticed a scenario where the VPN seems to stay connected and wondered if you have seen this or know how this is working.

Part of our setup/solution requires VOIP. We would like to go with open source, but we also tried the Bria VOIP app. When Bria is running and an account is registered, the OpenVPN client appears to stay connected even while the phone is asleep. I am wondering if this has anything to do with the fact that VOIP is one of the types of apps that can stay running in the background of iOS (along with apps that provide location services and a few other types)? If that is the case, I thought maybe it had to do with the length of time between keep-alives. But then I tested Bria on wifi and cellular, and with keep-alives set to as high as 200 seconds, and yet it still stays connected.

For open source VOIP, we are looking at Linphone. But with Linphone running, OpenVPN DOES NOT stay connected when the phone goes to sleep.

Has anyone seen this behavior? Any idea what Bria could be doing that allows the VPN to stay connected? We would really like to continue to use OpenVPN, but we also need to be able to stay connected. If we can figure out how Bria keeps the VPN connected, maybe we can implement that for Linphone or whatever open source solution we use.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN stays connected on iOS with Bria VOIP. How?

Post by TinCanTech » Thu Nov 03, 2016 4:35 pm

afriedman wrote:Any idea what Bria could be doing that allows the VPN to stay connected?
I would ask Bria ..

afriedman
OpenVpn Newbie
Posts: 3
Joined: Thu Nov 03, 2016 2:44 pm

Re: OpenVPN stays connected on iOS with Bria VOIP. How?

Post by afriedman » Thu Nov 03, 2016 4:44 pm

Thanks, I guess I will ask them too, although being a paid app I doubt they will tell me. Bria is on the App store, so I would think they aren't doing anything shady or unknown. I posted here because I was wondering if there is some combination of conditions known to regular OpenVPN users that will allow the VPN client to stay connected on iOS.

sri wandini
OpenVpn Newbie
Posts: 1
Joined: Fri Nov 04, 2016 6:55 am

Re: OpenVPN stays connected on iOS with Bria VOIP. How?

Post by sri wandini » Fri Nov 04, 2016 7:08 am

TinCanTech wrote:
afriedman wrote:Any idea what Bria could be doing that allows the VPN to stay connected?
I would ask Bria ..

blacky
OpenVpn Newbie
Posts: 2
Joined: Sat Dec 03, 2016 12:34 pm

Re: OpenVPN stays connected on iOS with Bria VOIP. How?

Post by blacky » Sat Dec 03, 2016 12:38 pm

Hi. Any luck discovering what it is about Bria that keeps OpenVPN Connect on iOS alive? Thanks

afriedman
OpenVpn Newbie
Posts: 3
Joined: Thu Nov 03, 2016 2:44 pm

Re: OpenVPN stays connected on iOS with Bria VOIP. How?

Post by afriedman » Mon Dec 05, 2016 4:46 pm

Nope, sorry! Being a VOIP app, they are "permitted" to run in the background, but unless they are actively doing something they will be suspended. At someone's recommendation, I tried a simple app set to be viewed as a VOIP app that just opens an AVPlayer, plays a short silent clip (less than a second), with setActionAtItemEnd:AVPlayerActionAtItemEndNone to keep it open. I tried a few variations of this but they all ended up about the same. This was just an example and would never be permitted in the app store outside of an actual VOIP app (which, in theory, shouldn't do that). The app stayed alive in the background and which kept the VPN up and connected, but it drained battery much faster than Bria's app, so I doubt that's what they are doing. Fully drained battery on a new iPhone 7 in less than 24 hours. Keeping Bria open seemed only to produce about half the battery drain.

Post Reply