示例#1
0
 /**
  * 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();
   }
 }
示例#2
0
 /** 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);
 }
示例#3
0
 public void busy() {
   if (dialog != null) dialog.busy(); // modified
 }
示例#4
0
 /** Modify the current call */
 public void modify(String contact, String sdp) {
   local_sdp = sdp;
   if (dialog != null) dialog.reInvite(contact, local_sdp);
 }
示例#5
0
 /** Close the ongoing call */
 public void bye() {
   if (dialog != null) dialog.bye();
 }
示例#6
0
 /** Cancels the outgoing call */
 public void cancel() {
   if (dialog != null) dialog.cancel();
 }
示例#7
0
 /** Refuses the incoming call */
 public void refuse() {
   if (dialog != null) dialog.refuse();
 }
示例#8
0
 /** Redirects the incoming call */
 public void redirect(String redirect_url) {
   if (dialog != null) dialog.redirect(302, "Moved Temporarily", redirect_url);
 }
示例#9
0
 /** Accepts the incoming call */
 public void accept(String sdp) {
   local_sdp = sdp;
   if (dialog != null) dialog.accept(contact_url, local_sdp);
 }
示例#10
0
 /** Respond to a incoming call (invite) with <i>resp</i> */
 public void respond(Message resp) {
   if (dialog != null) dialog.respond(resp);
 }
示例#11
0
 /** Rings back for the incoming call */
 public void ring(String sdp) { // modified
   local_sdp = sdp;
   if (dialog != null) dialog.ring(sdp);
 }
示例#12
0
 /** Answers at the 2xx/offer (in the ack message) */
 public void ackWithAnswer(String sdp) {
   local_sdp = sdp;
   dialog.ackWithAnswer(contact_url, sdp);
 }
示例#13
0
 /** 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);
 }
示例#14
0
 /** Waits for an incoming call */
 public void listen() {
   dialog = new InviteDialog(sip_provider, this);
   dialog.listen();
 }
示例#15
0
 /** Whether the call is on (active). */
 public boolean isOnCall() {
   return dialog.isSessionActive();
 }