Linphone的登录并非直接调用LinphoneCore的addAuthInfo就可以,而是需要做一些配置的设定:
public int login(String strName, String strPassword, String strDomain) throws LinphoneCoreException{
String strIdetify = "sip:" + strName + "@" + strDomain;
if (strPassword != null) {
// create authentication structure from identity and add to core
mLinphoneCore.addAuthInfo(LinphoneCoreFactory.instance().createAuthInfo(strName, strPassword, null, strDomain));
}
LinphoneProxyConfig proxyCfg = mLinphoneCore.createProxyC