-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wifi network not prioritzed over mobile network on iOS #85
Comments
Hi, the default network interface is "guessed" based on the routing table. The algorithm could you please provide output of the "netstat" command and routing table? NOTE: I think this issue belongs in the baresip project. /Alfred |
Hi Alfred, Ok, thanks for clearing that up. I was uncertain if this was supposted work with network cost 'out-of-the-box'. I am unsure on how to provide output of netstat and routing table.. How do I do that? Note also that I have no jailbreaked iPhone if that is needed for output. Br, |
Start baresip and type the
or use the functions from your code:
|
Hi, Sorry for the delay but here's the output from netstat: --- Network debug --- -- At this point I have mobile carrier network and WiFi both running and I would like to have 192.168.1.129, the WiFi address as the preferred interface. I see no net routes. Is that normal? Br, |
check if HAVE_SYS_SYSCTL_H and HAVE_NET_ROUTE_H is defined, the logic for detecting this is in src/net/mod.mk:
oh.. looks like But, I think to solve the problem properly you have to use some iOS specific |
Hi. Yes, I noticed also that net/route.h is missing in the iPhone SDK. I does however exist in the MacOSX SDK so I just made a copy of it:
And it seems to be working! Netstat command now shows lots of routes and baresip defaults to WiFi just like I would like it to. I will continue running some more tests but this seems to be a close enough solution. Thank you for all your help! |
Hi all,
I'm running baresip on iOS 11.0.2 (on iPhone6) and there seems to be some problems when choosing the default network interface in libre for the SIP-stack.
No specific network interface has been set in baresip config. If both mobile network and wifi are up, then mobile network is chosen over wifi. To make baresip use wifi network, then mobile network has to be disabled in phone settings.
This is different from how it is working on android, where wifi is chosen as the preferred network over mobile network automatically by the baresip net_change monitor.
Is this a bug or 'feature' ? :)
Br,
Per Enstedt - wx3 telecom
The text was updated successfully, but these errors were encountered: