linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] Linphone help lib Android


From: TI - Tobias
Subject: [Linphone-developers] Linphone help lib Android
Date: Fri, 21 Aug 2015 10:46:02 -0300

Hello !

My Name is Tobias, i’m new in linphone lib, i’m trying to use for some days and getting some error..

i’m trying to use this linphone lib for develop a dialer..
but i'm with some difficulties..

i download the SDK from link - https://www.linphone.org/releases/android/linphone-android-sdk-latest.zip
added the *.so files in jniLibs folder in my project, and add the linphone.jar as a library too
obs : i’m using android studio..

i downloaded the example from  here git clone git://git.linphone.org/linphone-iphone.git --recursive
and after compile all, it run all good..

I want to register one Sip Account in my Asterisk server, and make a call to another account in the same server..


the First thing i doing is this : 
LinphoneManager.createAndStart(this.context); //Sending the context
but when i run, i get this error : 
08-21 10:08:45.424  30134-30134/com.test.linphone I/Linphone﹕ Setting buffer size to 960 and sample rate to 48000 for OpenSLES MS sound card.
08-21 10:08:45.434  30134-30134/com.test.linphone A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x0000000e (code=1), thread 30134 (.linphone)


And i don’t know if this method for register is right..

private void registerSip(String username, String password, String domain) {

if(username.startsWith("sip:")) {
username = username.substring(4);
}

if (username.contains("@"))
username = username.split("@")[0];

if(domain.startsWith("sip:")) {
domain = domain.substring(4);
}

String identity = "sip:" + username + "@" + domain;
try {
address = LinphoneCoreFactory.instance().createLinphoneAddress(identity);
} catch (LinphoneCoreException e) {
e.printStackTrace();
}


LinphonePreferences.AccountBuilder builder = new LinphonePreferences.AccountBuilder(LinphoneManager.getLc())
.setUsername(username)
.setDomain(domain)
.setPassword(password)
.setOutboundProxyEnabled(true);
;


try {
builder.saveNewAccount();
} catch (
LinphoneCoreException e) {
e.printStackTrace();
}
}


i don’t know if this codes above are right..
if not, what i need to do for register a sip acc and make a internal call ?

Thank you very much!

Att
Tobias


reply via email to

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