/** * Closes an ongoing or incoming/outgoing call * * <p>It trys to fires refuse(), cancel(), and bye() methods */ public void hangup() { if (RtpStreamSender.isAudioPlay()) { RtpStreamSender.stopAndCleanup(); } if (dialog != null) { // try dialog.refuse(), cancel(), and bye() // methods.. dialog.refuse(); dialog.cancel(); dialog.bye(); } }
/** Starts a new call, inviting a remote user (<i>callee</i>) */ public void call( String callee, String from, String contact, String sdp, String icsi) { // modified by mandrajg printLog("calling " + callee, LogLevel.HIGH); if (from == null) from = from_url; if (contact == null) contact = contact_url; if (sdp != null) local_sdp = sdp; dialog = new InviteDialog(sip_provider, this); if (local_sdp != null) dialog.invite(callee, from, contact, local_sdp, icsi); // modified by mandrajg else dialog.inviteWithoutOffer(callee, from, contact); }
public void busy() { if (dialog != null) dialog.busy(); // modified }
/** Modify the current call */ public void modify(String contact, String sdp) { local_sdp = sdp; if (dialog != null) dialog.reInvite(contact, local_sdp); }
/** Close the ongoing call */ public void bye() { if (dialog != null) dialog.bye(); }
/** Cancels the outgoing call */ public void cancel() { if (dialog != null) dialog.cancel(); }
/** Refuses the incoming call */ public void refuse() { if (dialog != null) dialog.refuse(); }
/** Redirects the incoming call */ public void redirect(String redirect_url) { if (dialog != null) dialog.redirect(302, "Moved Temporarily", redirect_url); }
/** Accepts the incoming call */ public void accept(String sdp) { local_sdp = sdp; if (dialog != null) dialog.accept(contact_url, local_sdp); }
/** Respond to a incoming call (invite) with <i>resp</i> */ public void respond(Message resp) { if (dialog != null) dialog.respond(resp); }
/** Rings back for the incoming call */ public void ring(String sdp) { // modified local_sdp = sdp; if (dialog != null) dialog.ring(sdp); }
/** Answers at the 2xx/offer (in the ack message) */ public void ackWithAnswer(String sdp) { local_sdp = sdp; dialog.ackWithAnswer(contact_url, sdp); }
/** Starts a new call with the <i>invite</i> message request */ public void call(Message invite) { dialog = new InviteDialog(sip_provider, this); local_sdp = invite.getBody(); if (local_sdp != null) dialog.invite(invite); else dialog.inviteWithoutOffer(invite); }
/** Waits for an incoming call */ public void listen() { dialog = new InviteDialog(sip_provider, this); dialog.listen(); }
/** Whether the call is on (active). */ public boolean isOnCall() { return dialog.isSessionActive(); }