diff --git a/src/org/linphone/LinphonePreferences.java b/src/org/linphone/LinphonePreferences.java index 002f3b8ac..5bb5b4c0c 100644 --- a/src/org/linphone/LinphonePreferences.java +++ b/src/org/linphone/LinphonePreferences.java @@ -349,15 +349,24 @@ public class LinphonePreferences { LinphoneAddress proxyAddr; try { proxyAddr = LinphoneCoreFactory.instance().createLinphoneAddress(proxyConfig.getProxy()); - + int port = 0; if (transport.equals(getString(R.string.pref_transport_udp_key))) { proxyAddr.setTransport(TransportType.LinphoneTransportUdp); } else if (transport.equals(getString(R.string.pref_transport_tcp_key))) { proxyAddr.setTransport(TransportType.LinphoneTransportTcp); } else if (transport.equals(getString(R.string.pref_transport_tls_key))) { proxyAddr.setTransport(TransportType.LinphoneTransportTls); + port = 5223; } + /* 3G mobile firewall might block random TLS port, so we force use of 5223. + * However we must NOT use this port when changing to TCP/UDP because otherwise + * REGISTER (and everything actually) will fail... + * */ + if ("sip.linphone.org".equals(proxyConfig.getDomain())) { + proxyAddr.setPort(port); + } + LinphoneProxyConfig prxCfg = getProxyConfig(n); prxCfg.edit(); prxCfg.setProxy(proxyAddr.asStringUriOnly()); diff --git a/submodules/linphone b/submodules/linphone index 273207b25..4ebc9c85b 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 273207b25c2087d665f45f3793c625dc5bf83545 +Subproject commit 4ebc9c85b954fd0e993a3f7e8890ae190fd8a79e