linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Integrate Liblinphone 4 in android project


From: Orel KAMDEM
Subject: Re: [Linphone-developers] Integrate Liblinphone 4 in android project
Date: Mon, 8 Oct 2018 02:27:11 +0100

That's my code in java android : 
(I have no registration failed or success log in my pbx asterisk)
    Factory.instance().setDebugMode(true, "Linphone");
Core core = Factory.instance().createCore(null, null, this);
ProxyConfig proxyConfig = core.createProxyConfig();
// Create Authentication object
Address from = Factory.instance().createAddress("sip:112@X.X.X.X");
AuthInfo authInfos;
authInfos = Factory.instance().createAuthInfo(from.getUsername(), null, "xxxx", null, null, null);
core.addAuthInfo(authInfos);
/* authInfos.setDomain("13.232.95.126");
authInfos.setUsername("112");
authInfos.setPassword("secretjd");
authInfos.setUserid("112");*/
proxyConfig.edit();
proxyConfig.setIdentityAddress(from);
System.out.println("Domain from.getDomain "+from.getDomain());
proxyConfig.setServerAddr(from.getDomain());
proxyConfig.enableRegister(true);
proxyConfig.done();

core.addProxyConfig(proxyConfig);
core.setDefaultProxyConfig(proxyConfig);

String[] dnsServer = new String[1];
dnsServer[0]="8.8.8.8";
core.setDnsServers(dnsServer);
// core.setPrimaryContact("sip:address@hidden");

Address to = Factory.instance().createAddress("sip:address@hidden");
core.invite("sip:105@X.X.X.X");

// You must provide the Android app context as createCore last param !
// core.setPrimaryContact("sip:address@hidden");
core.start();

// core.inviteAddress(to);
System.out.println("initialization is ok???");
} catch (Exception theException) {
System.out.println("Exception in call : " + theException.getMessage());
}


Mailtrack Sender notified by
Mailtrack 08/10/18 à 02:26:22

Le lun. 8 oct. 2018 à 02:18, Orel KAMDEM <address@hidden> a écrit :

I am looking to develop a voice communication application, I set up an asterisk server and I want to integrate a sip client in my android application. After intensive research on the net, I found no documentation to integrate liblinphone 4 in an android project. Does anyone have an idea? Currently I have integrated this code trying to understand a little example in C of an old version of liblinphone: (But i have this error : Linphone: Contact has not been fixed, stack will do, i think that if i can fixed contact, I could make registration)




--
KAMDEM Patrick
Dévops
Tel:00237 690943203

Mailtrack Sender notified by
Mailtrack 08/10/18 à 02:18:23


--
KAMDEM Patrick
Dévops
Tel:00237 690943203

reply via email to

[Prev in Thread] Current Thread [Next in Thread]