Hi,
Thanks for the answer, but I tried the code below and the data is still being sent through port 5060, not the new port. Please let me know what I'm doing wrong:
LoginActivity.java
saveCreatedAccount()
String forcedProxy = "";
if (!TextUtils.isEmpty(forcedProxy)) {
builder.setProxy(forcedProxy)
.setOutboundProxyEnabled(true)
.setAvpfRRInterval(5);
}
builder.setProxy("sip:" + "domain.com:" + 5353);
if(transport != null){
builder.setTransport(transport);
}
mPrefs.setStunServer("ice.domain.com");
mPrefs.setIceEnabled(true);
LinphoneManager.java:
public void initAccounts(LinphoneCore mLc,String username,String password, String domain) throws LinphoneCoreException {
mLc.clearAuthInfos();
mLc.clearProxyConfigs();
LinphoneAuthInfo lAuthInfo = LinphoneCoreFactory.instance().createAuthInfo(username, password, null, domain);
mLc.addAuthInfo(lAuthInfo);
String identity = "sip:" + username +"@" + domain;
String proxy = "sip:" + domain;
LinphoneAddress proxyAddr = LinphoneCoreFactory.instance().createLinphoneAddress(proxy);
proxyAddr.setPort(5353);
proxyAddr.setTransport(LinphoneAddress.TransportType.LinphoneTransportUdp);
LinphoneProxyConfig proxycon = mLc.createProxyConfig(identity, proxyAddr.asStringUriOnly(), proxyAddr.asStringUriOnly(), true);
mLc.addProxyConfig(proxycon);
mLc.setDefaultProxyConfig(proxycon);
LinphoneProxyConfig lDefaultProxyConfig = mLc.getDefaultProxyConfig();
if (lDefaultProxyConfig != null) {
//escape +
lDefaultProxyConfig.setDialEscapePlus(false);
} else if (LinphoneService.isReady()) {
getLc().addListener(this);
// this.registrationState(mLc, lDefaultProxyConfig, RegistrationState.RegistrationNone, null);
}
}