MjSip Stack
v1.6

org.zoolu.sip.call
Class CallListenerAdapter

java.lang.Object
  |
  +--org.zoolu.sip.call.CallListenerAdapter
All Implemented Interfaces:
CallListener, ExtendedCallListener

public abstract class CallListenerAdapter
extends java.lang.Object
implements ExtendedCallListener

Class CallListenerAdapter implements CallListener interface providing a dummy implementation of all Call callback functions used to capture Call events.

CallListenerAdapter can be extended to manage basic SIP calls. The callback methods defined in this class have basically a void implementation. This class exists as convenience for creating call listener objects.
You can extend this class overriding only methods corresponding to events you want to handle.

onCallIncoming(NameAddress,String) is the only non-empty method. It signals the receiver the ring status (by using method Call.ring()), adapts the sdp body and accepts the call (by using method Call.accept(sdp)).


Constructor Summary
protected CallListenerAdapter()
          Creates a new dummy call listener
 
Method Summary
 void onCallAccepted(Call call, java.lang.String sdp, Message resp)
          Does nothing.
 void onCallCanceling(Call call, Message cancel)
          Does nothing.
 void onCallClosed(Call call, Message resp)
          Does nothing.
 void onCallClosing(Call call, Message bye)
          Does nothing.
 void onCallConfirmed(Call call, java.lang.String sdp, Message ack)
          Does nothing.
 void onCallIncoming(Call call, NameAddress callee, NameAddress caller, java.lang.String sdp, Message invite)
          Accepts an incoming call.
 void onCallModifying(Call call, java.lang.String sdp, Message invite)
          Changes the call when remotly requested.
 void onCallRedirection(Call call, java.lang.String reason, java.util.Vector contact_list, Message resp)
          Redirects the call when remotly requested.
 void onCallRefused(Call call, java.lang.String reason, Message resp)
          Does nothing.
 void onCallReInviteAccepted(Call call, java.lang.String sdp, Message resp)
          Does nothing.
 void onCallReInviteRefused(Call call, java.lang.String reason, Message resp)
          Does nothing.
 void onCallReInviteTimeout(Call call)
          Does nothing.
 void onCallRinging(Call call, Message resp)
          Does nothing.
 void onCallTimeout(Call call)
          Does nothing.
 void onCallTransfer(ExtendedCall call, NameAddress refer_to, NameAddress refered_by, Message refer)
          Does nothing.
 void onCallTransferAccepted(ExtendedCall call, Message resp)
          Does nothing.
 void onCallTransferFailure(ExtendedCall call, java.lang.String reason, Message notify)
          Does nothing.
 void onCallTransferRefused(ExtendedCall call, java.lang.String reason, Message resp)
          Does nothing.
 void onCallTransferSuccess(ExtendedCall call, Message notify)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallListenerAdapter

protected CallListenerAdapter()
Creates a new dummy call listener
Method Detail

onCallIncoming

public void onCallIncoming(Call call,
                           NameAddress callee,
                           NameAddress caller,
                           java.lang.String sdp,
                           Message invite)
Accepts an incoming call. Callback function called when arriving a new INVITE method (incoming call)
Specified by:
onCallIncoming in interface CallListener

onCallModifying

public void onCallModifying(Call call,
                            java.lang.String sdp,
                            Message invite)
Changes the call when remotly requested. Callback function called when arriving a new Re-INVITE method (re-inviting/call modify)
Specified by:
onCallModifying in interface CallListener

onCallRinging

public void onCallRinging(Call call,
                          Message resp)
Does nothing. Callback function called when arriving a 180 Ringing
Specified by:
onCallRinging in interface CallListener

onCallAccepted

public void onCallAccepted(Call call,
                           java.lang.String sdp,
                           Message resp)
Does nothing. Callback function called when arriving a 2xx (call accepted)
Specified by:
onCallAccepted in interface CallListener

onCallRefused

public void onCallRefused(Call call,
                          java.lang.String reason,
                          Message resp)
Does nothing. Callback function called when arriving a 4xx (call failure)
Specified by:
onCallRefused in interface CallListener

onCallRedirection

public void onCallRedirection(Call call,
                              java.lang.String reason,
                              java.util.Vector contact_list,
                              Message resp)
Redirects the call when remotly requested. Callback function called when arriving a 3xx (call redirection)
Specified by:
onCallRedirection in interface CallListener

onCallConfirmed

public void onCallConfirmed(Call call,
                            java.lang.String sdp,
                            Message ack)
Does nothing. Callback function called when arriving an ACK method (call confirmed)
Specified by:
onCallConfirmed in interface CallListener

onCallTimeout

public void onCallTimeout(Call call)
Does nothing. Callback function called when the invite expires
Specified by:
onCallTimeout in interface CallListener

onCallReInviteAccepted

public void onCallReInviteAccepted(Call call,
                                   java.lang.String sdp,
                                   Message resp)
Does nothing. Callback function called when arriving a 2xx (re-invite/modify accepted)
Specified by:
onCallReInviteAccepted in interface CallListener

onCallReInviteRefused

public void onCallReInviteRefused(Call call,
                                  java.lang.String reason,
                                  Message resp)
Does nothing. Callback function called when arriving a 4xx (re-invite/modify failure)
Specified by:
onCallReInviteRefused in interface CallListener

onCallReInviteTimeout

public void onCallReInviteTimeout(Call call)
Does nothing. Callback function called when a re-invite expires
Specified by:
onCallReInviteTimeout in interface CallListener

onCallCanceling

public void onCallCanceling(Call call,
                            Message cancel)
Does nothing. Callback function called when arriving a CANCEL request
Specified by:
onCallCanceling in interface CallListener

onCallClosing

public void onCallClosing(Call call,
                          Message bye)
Does nothing. Callback function that may be overloaded (extended). Called when arriving a BYE request
Specified by:
onCallClosing in interface CallListener

onCallClosed

public void onCallClosed(Call call,
                         Message resp)
Does nothing. Callback function that may be overloaded (extended). Called when arriving a response for a BYE request (call closed)
Specified by:
onCallClosed in interface CallListener

onCallTransfer

public void onCallTransfer(ExtendedCall call,
                           NameAddress refer_to,
                           NameAddress refered_by,
                           Message refer)
Does nothing. Callback function called when arriving a new REFER method (transfer request)
Specified by:
onCallTransfer in interface ExtendedCallListener

onCallTransferAccepted

public void onCallTransferAccepted(ExtendedCall call,
                                   Message resp)
Does nothing. Callback function called when a call transfer is accepted.
Specified by:
onCallTransferAccepted in interface ExtendedCallListener

onCallTransferRefused

public void onCallTransferRefused(ExtendedCall call,
                                  java.lang.String reason,
                                  Message resp)
Does nothing. Callback function called when a call transfer is refused.
Specified by:
onCallTransferRefused in interface ExtendedCallListener

onCallTransferSuccess

public void onCallTransferSuccess(ExtendedCall call,
                                  Message notify)
Does nothing. Callback function called when a call transfer is successfully completed
Specified by:
onCallTransferSuccess in interface ExtendedCallListener

onCallTransferFailure

public void onCallTransferFailure(ExtendedCall call,
                                  java.lang.String reason,
                                  Message notify)
Does nothing. Callback function called when a call transfer is NOT sucessfully completed
Specified by:
onCallTransferFailure in interface ExtendedCallListener

MjSip Stack
v1.6