Listener

class Listener
kotlin.Any
   ↳ android.net.sip.SipSession.Listener

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.


Requires API level 9 (Android 2.3, Gingerbread)

Summary

Public constructors

Public methods
open Unit
onCalling(session: SipSession!)

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

open Unit

Called when a registration request is sent.

open Unit
onCallEstablished(session: SipSession!, sessionDescription: String!)

Called when the session is established.

open Unit
onRegistrationDone(session: SipSession!, duration: Int)

Called when registration is successfully done.

open Unit

Called when the registration gets timed out.

open Unit
onRinging(session: SipSession!, caller: SipProfile!, sessionDescription: String!)

Called when an INVITE request is received.

open Unit

Called when the session is terminated.

open Unit
onRegistrationFailed(session: SipSession!, errorCode: Int, errorMessage: String!)

Called when the registration fails.

open Unit

Called when the peer is busy during session initialization.

open Unit

Called when a RINGING response is received for the INVITE request sent
Requires API level 9 (Android 2.3, Gingerbread)

open Unit
onError(session: SipSession!, errorCode: Int, errorMessage: String!)

Called when an error occurs during session initialization and termination.

open Unit
onCallChangeFailed(session: SipSession!, errorCode: Int, errorMessage: String!)

Called when an error occurs during session modification negotiation.

Public constructors

<init>

Listener()

Public methods

onCalling

added in API level 9
open fun onCalling(session: SipSession!): Unit

Called when an INVITE request is sent to initiate a new call.
Requires API level 9 (Android 2.3, Gingerbread)

Parameters
session SipSession!: the session object that carries out the transaction

onRegistering

added in API level 9
open fun onRegistering(session: SipSession!): Unit

Called when a registration request is sent.
Requires API level 9 (Android 2.3, Gingerbread)

Parameters
session SipSession!: the session object that carries out the transaction

onCallEstablished

added in API level 9
open fun onCallEstablished(session: SipSession!, sessionDescription: String!): Unit

Called when the session is established.
Requires API level 9 (Android 2.3, Gingerbread)

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

onRegistrationDone

added in API level 9
open fun onRegistrationDone(session: SipSession!, duration: Int): Unit

Called when registration is successfully done.
Requires API level 9 (Android 2.3, Gingerbread)

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

onRegistrationTimeout

added in API level 9
open fun onRegistrationTimeout(session: SipSession!): Unit

Called when the registration gets timed out.
Requires API level 9 (Android 2.3, Gingerbread)

Parameters
session SipSession!: the session object that carries out the transaction

onRinging

added in API level 9
open fun onRinging(session: SipSession!, caller: SipProfile!, sessionDescription: String!): Unit

Called when an INVITE request is received.
Requires API level 9 (Android 2.3, Gingerbread)

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

onCallEnded

added in API level 9
open fun onCallEnded(session: SipSession!): Unit

Called when the session is terminated.
Requires API level 9 (Android 2.3, Gingerbread)

Parameters
session SipSession!: the session object that is associated with the dialog

onRegistrationFailed

added in API level 9
open fun onRegistrationFailed(session: SipSession!, errorCode: Int, errorMessage: String!): Unit

Called when the registration fails.
Requires API level 9 (Android 2.3, Gingerbread)

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

onCallBusy

added in API level 9
open fun onCallBusy(session: SipSession!): Unit

Called when the peer is busy during session initialization.
Requires API level 9 (Android 2.3, Gingerbread)

Parameters
session SipSession!: the session object that carries out the transaction

onRingingBack

added in API level 9
open fun onRingingBack(session: SipSession!): Unit

Called when a RINGING response is received for the INVITE request sent
Requires API level 9 (Android 2.3, Gingerbread)

Parameters
session SipSession!: the session object that carries out the transaction

onError

added in API level 9
open fun onError(session: SipSession!, errorCode: Int, errorMessage: String!): Unit

Called when an error occurs during session initialization and termination.
Requires API level 9 (Android 2.3, Gingerbread)

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

onCallChangeFailed

added in API level 9
open fun onCallChangeFailed(session: SipSession!, errorCode: Int, errorMessage: String!): Unit

Called when an error occurs during session modification negotiation.
Requires API level 9 (Android 2.3, Gingerbread)

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