Fix proxy preference
This commit is contained in:
parent
129b1e7207
commit
e25a87696c
1 changed files with 7 additions and 6 deletions
|
@ -247,7 +247,6 @@ public class LinphonePreferences {
|
||||||
|
|
||||||
public void setAccountDomain(int n, String domain) {
|
public void setAccountDomain(int n, String domain) {
|
||||||
String identity = "sip:" + getAccountUsername(n) + "@" + domain;
|
String identity = "sip:" + getAccountUsername(n) + "@" + domain;
|
||||||
String proxy = "sip:" + domain;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LinphoneAuthInfo authInfo = getClonedAuthInfo(n);
|
LinphoneAuthInfo authInfo = getClonedAuthInfo(n);
|
||||||
|
@ -256,7 +255,6 @@ public class LinphonePreferences {
|
||||||
|
|
||||||
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
||||||
prxCfg.setIdentity(identity);
|
prxCfg.setIdentity(identity);
|
||||||
prxCfg.setProxy(proxy);
|
|
||||||
prxCfg.done();
|
prxCfg.done();
|
||||||
} catch (LinphoneCoreException e) {
|
} catch (LinphoneCoreException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -283,6 +281,9 @@ public class LinphonePreferences {
|
||||||
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
||||||
prxCfg.setProxy(proxy);
|
prxCfg.setProxy(proxy);
|
||||||
prxCfg.done();
|
prxCfg.done();
|
||||||
|
if (isAccountOutboundProxySet(n)) {
|
||||||
|
setAccountOutboundProxyEnabled(n, true);
|
||||||
|
}
|
||||||
} catch (LinphoneCoreException e) {
|
} catch (LinphoneCoreException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -318,14 +319,14 @@ public class LinphonePreferences {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNewAccountContactParameters(String contactParams) {
|
|
||||||
tempContactsParams = contactParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAccountOutboundProxySet(int n) {
|
public boolean isAccountOutboundProxySet(int n) {
|
||||||
return getProxyConfig(n).getRoute() != null;
|
return getProxyConfig(n).getRoute() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setNewAccountContactParameters(String contactParams) {
|
||||||
|
tempContactsParams = contactParams;
|
||||||
|
}
|
||||||
|
|
||||||
public String getExpires(int n) {
|
public String getExpires(int n) {
|
||||||
return String.valueOf(getProxyConfig(n).getExpires());
|
return String.valueOf(getProxyConfig(n).getExpires());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue