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