MjSip Stack
v1.6

org.zoolu.sip.call
Class ExtendedCall

java.lang.Object
  |
  +--org.zoolu.sip.call.Call
        |
        +--org.zoolu.sip.call.ExtendedCall
All Implemented Interfaces:
ExtendedInviteDialogListener, InviteDialogListener

public class ExtendedCall
extends Call
implements ExtendedInviteDialogListener

Class ExtendedCall extends basic SIP calls.

It implements:
- call transfer (REFER/NOTIFY methods)


Fields inherited from class org.zoolu.sip.call.Call
contact_url, dialog, from_url, local_sdp, remote_sdp, sip_provider
 
Constructor Summary
ExtendedCall(SipProvider sip_provider, java.lang.String from_url, java.lang.String contact_url, ExtendedCallListener call_listener)
          Creates a new ExtendedCall.
ExtendedCall(SipProvider sip_provider, java.lang.String from_url, java.lang.String contact_url, java.lang.String username, java.lang.String realm, java.lang.String passwd, ExtendedCallListener call_listener)
          Creates a new ExtendedCall.
 
Method Summary
 void acceptTransfer()
          Accepts a call transfer request
 void call(Message invite)
          Starts a new call with the invite message request
 void call(java.lang.String r_user, java.lang.String from, java.lang.String contact, java.lang.String sdp)
          Starts a new call, inviting a remote user (r_user)
 void listen()
          Waits for an incoming call
 void notify(int code, java.lang.String reason)
          Notifies the satus of an other call
 void onDlgAltRequest(InviteDialog d, java.lang.String method, java.lang.String body, Message msg)
          When an incoming request is received within the dialog different from INVITE, CANCEL, ACK, BYE
 void onDlgAltResponse(InviteDialog d, java.lang.String method, int code, java.lang.String reason, java.lang.String body, Message msg)
          When a response is received for a request within the dialog different from INVITE, CANCEL, ACK, BYE
 void onDlgNotify(InviteDialog d, java.lang.String event, java.lang.String sipfragment, Message msg)
          When an incoming NOTIFY request is received within the dialog
 void onDlgRefer(InviteDialog d, NameAddress refer_to, NameAddress referred_by, Message msg)
          When an incoming REFER request is received within the dialog
 void onDlgReferResponse(InviteDialog d, int code, java.lang.String reason, Message msg)
          When a response is received for a REFER request within the dialog
protected  void printLog(java.lang.String str, int level)
          Adds a new string to the default Log
 void refuseTransfer()
          Refuses a call transfer request
 void transfer(java.lang.String transfer_to)
          Requests a call transfer
 
Methods inherited from class org.zoolu.sip.call.Call
accept, ackWithAnswer, bye, call, call, cancel, getLocalSessionDescriptor, getRemoteSessionDescriptor, hangup, isOnCall, modify, onDlgAck, onDlgBye, onDlgByeFailureResponse, onDlgByeSuccessResponse, onDlgCall, onDlgCancel, onDlgClose, onDlgInvite, onDlgInviteFailureResponse, onDlgInviteProvisionalResponse, onDlgInviteRedirectResponse, onDlgInviteSuccessResponse, onDlgReInvite, onDlgReInviteFailureResponse, onDlgReInviteProvisionalResponse, onDlgReInviteSuccessResponse, onDlgReInviteTimeout, onDlgTimeout, redirect, refuse, respond, ring, setLocalSessionDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zoolu.sip.dialog.InviteDialogListener
onDlgAck, onDlgBye, onDlgByeFailureResponse, onDlgByeSuccessResponse, onDlgCall, onDlgCancel, onDlgClose, onDlgInvite, onDlgInviteFailureResponse, onDlgInviteProvisionalResponse, onDlgInviteRedirectResponse, onDlgInviteSuccessResponse, onDlgReInvite, onDlgReInviteFailureResponse, onDlgReInviteProvisionalResponse, onDlgReInviteSuccessResponse, onDlgReInviteTimeout, onDlgTimeout
 

Constructor Detail

ExtendedCall

public ExtendedCall(SipProvider sip_provider,
                    java.lang.String from_url,
                    java.lang.String contact_url,
                    ExtendedCallListener call_listener)
Creates a new ExtendedCall.

ExtendedCall

public ExtendedCall(SipProvider sip_provider,
                    java.lang.String from_url,
                    java.lang.String contact_url,
                    java.lang.String username,
                    java.lang.String realm,
                    java.lang.String passwd,
                    ExtendedCallListener call_listener)
Creates a new ExtendedCall.
Method Detail

listen

public void listen()
Waits for an incoming call
Overrides:
listen in class Call

call

public void call(java.lang.String r_user,
                 java.lang.String from,
                 java.lang.String contact,
                 java.lang.String sdp)
Starts a new call, inviting a remote user (r_user)
Overrides:
call in class Call

call

public void call(Message invite)
Starts a new call with the invite message request
Overrides:
call in class Call

transfer

public void transfer(java.lang.String transfer_to)
Requests a call transfer

acceptTransfer

public void acceptTransfer()
Accepts a call transfer request

refuseTransfer

public void refuseTransfer()
Refuses a call transfer request

notify

public void notify(int code,
                   java.lang.String reason)
Notifies the satus of an other call

onDlgRefer

public void onDlgRefer(InviteDialog d,
                       NameAddress refer_to,
                       NameAddress referred_by,
                       Message msg)
When an incoming REFER request is received within the dialog
Specified by:
onDlgRefer in interface ExtendedInviteDialogListener

onDlgReferResponse

public void onDlgReferResponse(InviteDialog d,
                               int code,
                               java.lang.String reason,
                               Message msg)
When a response is received for a REFER request within the dialog
Specified by:
onDlgReferResponse in interface ExtendedInviteDialogListener

onDlgNotify

public void onDlgNotify(InviteDialog d,
                        java.lang.String event,
                        java.lang.String sipfragment,
                        Message msg)
When an incoming NOTIFY request is received within the dialog
Specified by:
onDlgNotify in interface ExtendedInviteDialogListener

onDlgAltRequest

public void onDlgAltRequest(InviteDialog d,
                            java.lang.String method,
                            java.lang.String body,
                            Message msg)
When an incoming request is received within the dialog different from INVITE, CANCEL, ACK, BYE
Specified by:
onDlgAltRequest in interface ExtendedInviteDialogListener

onDlgAltResponse

public void onDlgAltResponse(InviteDialog d,
                             java.lang.String method,
                             int code,
                             java.lang.String reason,
                             java.lang.String body,
                             Message msg)
When a response is received for a request within the dialog different from INVITE, CANCEL, ACK, BYE
Specified by:
onDlgAltResponse in interface ExtendedInviteDialogListener

printLog

protected void printLog(java.lang.String str,
                        int level)
Adds a new string to the default Log
Overrides:
printLog in class Call

MjSip Stack
v1.6