For more understanding, I suggest you download the source code of Linphone and check the codes: BelledonneCommunications
You can register in Sip servers with the following code :
Core core = LinphoneManager.getCore();
if (core != null) {
Log.i("[Generic Connection Assistant] Reloading configuration with default");
reloadDefaultAccountCreatorConfig();
}
AccountCreator accountCreator = getAccountCreator();
accountCreator.setUsername(mUsername.getText().toString());
accountCreator.setDomain(mDomain.getText().toString());
accountCreator.setPassword(mPassword.getText().toString());
accountCreator.setDisplayName(mDisplayName.getText().toString());
accountCreator.setTransport(TransportType.Udp);//Tls,Tcp,Dtls
createProxyConfigAndLeaveAssistant(true);
void reloadDefaultAccountCreatorConfig() {
Log.i("[Assistant] Reloading configuration with default");
reloadAccountCreatorConfig(LinphonePreferences.instance().getDefaultDynamicConfigFile());
}