/** When a new call is incoming */ public void onUaCallIncoming( UserAgent ua, SessionDescriptor remote_sdp, NameAddress callee, NameAddress caller) { printOut("Incoming Call from " + caller.toString()); String audio_file = callee.getAddress().getParameter(PARAM_RESOURCE); if (audio_file != null) if (new File(audio_file).isFile()) user_profile.send_file = audio_file; if (user_profile.send_file != null) ua.accept(); else ua.hangup(); user_profile.audio_port++; ua = new UserAgent(sip_provider, user_profile, this); ua.listen(); }
public void rejectcall() { ua.printLog("UA: HANGUP"); ua.hangup(); }