to top
Android APIs
public static class

SipSession.Listener

extends Object
java.lang.Object
   ↳ android.net.sip.SipSession.Listener

Class Overview

Listener for events relating to a SIP session, such as when a session is being registered ("on registering") or a call is outgoing ("on calling").

Many of these events are also received by SipAudioCall.Listener.

Summary

Public Constructors

? Examples
SipSession.Listener()
Public Methods

? Examples
void onCallBusy( SipSession session)
Called when the peer is busy during session initialization.

? Examples
void onCallChangeFailed( SipSession session, int errorCode, String errorMessage)
Called when an error occurs during session modification negotiation.

? Examples
void onCallEnded( SipSession session)
Called when the session is terminated.

? Examples
void onCallEstablished( SipSession session, String sessionDescription)
Called when the session is established.

? Examples
void onCalling( SipSession session)
Called when an INVITE request is sent to initiate a new call.

? Examples
void onError( SipSession session, int errorCode, String errorMessage)
Called when an error occurs during session initialization and termination.

? Examples
void onRegistering( SipSession session)
Called when a registration request is sent.

? Examples
void onRegistrationDone( SipSession session, int duration)
Called when registration is successfully done.

? Examples
void onRegistrationFailed( SipSession session, int errorCode, String errorMessage)
Called when the registration fails.

? Examples
void onRegistrationTimeout( SipSession session)
Called when the registration gets timed out.

? Examples
void onRinging( SipSession session, SipProfile caller, String sessionDescription)
Called when an INVITE request is received.

? Examples
void onRingingBack( SipSession session)
Called when a RINGING response is received for the INVITE request sent
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SipSession.Listener ()

Added in API level 9

Public Methods

public void onCallBusy (SipSession session)

Added in API level 9

Called when the peer is busy during session initialization.

Parameters
session the session object that carries out the transaction

public void onCallChangeFailed (SipSession session, int errorCode, String errorMessage)

Added in API level 9

Called when an error occurs during session modification negotiation.

Parameters
session the session object that carries out the transaction
errorCode error code defined in SipErrorCode
errorMessage error message

public void onCallEnded (SipSession session)

Added in API level 9

Called when the session is terminated.

Parameters
session the session object that is associated with the dialog

public void onCallEstablished (SipSession session, String sessionDescription)

Added in API level 9

Called when the session is established.

Parameters
session the session object that is associated with the dialog
sessionDescription the peer's session description

public void onCalling (SipSession session)

Added in API level 9

Called when an INVITE request is sent to initiate a new call.

Parameters
session the session object that carries out the transaction

public void onError (SipSession session, int errorCode, String errorMessage)

Added in API level 9

Called when an error occurs during session initialization and termination.

Parameters
session the session object that carries out the transaction
errorCode error code defined in SipErrorCode
errorMessage error message

public void onRegistering (SipSession session)

Added in API level 9

Called when a registration request is sent.

Parameters
session the session object that carries out the transaction

public void onRegistrationDone (SipSession session, int duration)

Added in API level 9

Called when registration is successfully done.

Parameters
session the session object that carries out the transaction
duration duration in second before the registration expires

public void onRegistrationFailed (SipSession session, int errorCode, String errorMessage)

Added in API level 9

Called when the registration fails.

Parameters
session the session object that carries out the transaction
errorCode error code defined in SipErrorCode
errorMessage error message

public void onRegistrationTimeout (SipSession session)

Added in API level 9

Called when the registration gets timed out.

Parameters
session the session object that carries out the transaction

public void onRinging (SipSession session, SipProfile caller, String sessionDescription)

Added in API level 9

Called when an INVITE request is received.

Parameters
session the session object that carries out the transaction
caller the SIP profile of the caller
sessionDescription the caller's session description

public void onRingingBack (SipSession session)

Added in API level 9

Called when a RINGING response is received for the INVITE request sent

Parameters
session the session object that carries out the transaction
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.