|
From: | Sagar Kotak |
Subject: | [Linphone-developers] Linphone Android |
Date: | Mon, 25 Jun 2012 15:00:29 -0400 |
try{
// TODO Auto-generated method stub
LinphoneAddress destinationSipAddress = lcFactory.createLinphoneAddress(destination);
LinphoneCallParams params = lc.createDefaultCallParameters();
params.setVideoEnabled(false);
LinphoneCall lCall = lc.inviteAddressWithParams(destinationSipAddress, params);
if (lCall == null) {
System.out.println("error");
return;
}
Log.i(lCall.getState());
running = true;
while (running) {
lc.iterate();
Log.i(lCall.getState());
try {
Thread.sleep(500);
} catch (InterruptedException ie) {
System.out.println("Interrupted!\nAborting");
return;
}
}
if (!State.CallEnd.equals(lCall.getState())) {
System.out.println("Terminating the call");
lc.terminateCall(lCall);
}
} finally {
lc.destroy();
}
Thank you very much.
Sagar
[Prev in Thread] | Current Thread | [Next in Thread] |