Use proper port when switching transport for sip.linphone.org domain: use 5223 for TLS, and none for UDP/TCP. It solves the registration issue when changing the transport to TCP/UDP after the wizard which has forced the port to 5223 for data networks limitation
This commit is contained in:
parent
04fa920bec
commit
3c7f18a956
2 changed files with 11 additions and 2 deletions
|
@ -349,15 +349,24 @@ public class LinphonePreferences {
|
||||||
LinphoneAddress proxyAddr;
|
LinphoneAddress proxyAddr;
|
||||||
try {
|
try {
|
||||||
proxyAddr = LinphoneCoreFactory.instance().createLinphoneAddress(proxyConfig.getProxy());
|
proxyAddr = LinphoneCoreFactory.instance().createLinphoneAddress(proxyConfig.getProxy());
|
||||||
|
int port = 0;
|
||||||
if (transport.equals(getString(R.string.pref_transport_udp_key))) {
|
if (transport.equals(getString(R.string.pref_transport_udp_key))) {
|
||||||
proxyAddr.setTransport(TransportType.LinphoneTransportUdp);
|
proxyAddr.setTransport(TransportType.LinphoneTransportUdp);
|
||||||
} else if (transport.equals(getString(R.string.pref_transport_tcp_key))) {
|
} else if (transport.equals(getString(R.string.pref_transport_tcp_key))) {
|
||||||
proxyAddr.setTransport(TransportType.LinphoneTransportTcp);
|
proxyAddr.setTransport(TransportType.LinphoneTransportTcp);
|
||||||
} else if (transport.equals(getString(R.string.pref_transport_tls_key))) {
|
} else if (transport.equals(getString(R.string.pref_transport_tls_key))) {
|
||||||
proxyAddr.setTransport(TransportType.LinphoneTransportTls);
|
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);
|
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
||||||
prxCfg.edit();
|
prxCfg.edit();
|
||||||
prxCfg.setProxy(proxyAddr.asStringUriOnly());
|
prxCfg.setProxy(proxyAddr.asStringUriOnly());
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 273207b25c2087d665f45f3793c625dc5bf83545
|
Subproject commit 4ebc9c85b954fd0e993a3f7e8890ae190fd8a79e
|
Loading…
Reference in a new issue