Most visited

Recently visited

Added in API level 9

SipSession.Listener

public static class SipSession.Listener
extends Object

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


监听器用于与SIP会话相关的事件,例如会话正在注册(“正在注册”)或正在呼出(“正在呼叫”)时。

许多这些事件也由 SipAudioCall.Listener收到。

Summary

Public constructors

SipSession.Listener()

Public methods

void onCallBusy(SipSession session)

当会话初始化期间对等体忙时调用。

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

在会话修改协商期间发生错误时调用。

void onCallEnded(SipSession session)

会话终止时调用。

void onCallEstablished(SipSession session, String sessionDescription)

当会话建立时调用。

void onCalling(SipSession session)

当发送INVITE请求发起新呼叫时调用。

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

在会话初始化和终止期间发生错误时调用。

void onRegistering(SipSession session)

在发送注册请求时调用。

void onRegistrationDone(SipSession session, int duration)

当注册成功完成时调用。

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

当注册失败时调用。

void onRegistrationTimeout(SipSession session)

当注册超时时调用。

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

在收到INVITE请求时调用。

void onRingingBack(SipSession session)

在收到发送的INVITE请求的RINGING响应时调用

Inherited methods

From class java.lang.Object

Public constructors

SipSession.Listener

Added in API level 9
SipSession.Listener ()

Public methods

onCallBusy

Added in API level 9
void onCallBusy (SipSession session)

当会话初始化期间对等体忙时调用。

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

onCallChangeFailed

Added in API level 9
void onCallChangeFailed (SipSession session, 
                int errorCode, 
                String errorMessage)

在会话修改协商期间发生错误时调用。

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

onCallEnded

Added in API level 9
void onCallEnded (SipSession session)

会话终止时调用。

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

onCallEstablished

Added in API level 9
void onCallEstablished (SipSession session, 
                String sessionDescription)

当会话建立时调用。

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

onCalling

Added in API level 9
void onCalling (SipSession session)

当发送INVITE请求发起新呼叫时调用。

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

onError

Added in API level 9
void onError (SipSession session, 
                int errorCode, 
                String errorMessage)

在会话初始化和终止期间发生错误时调用。

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

onRegistering

Added in API level 9
void onRegistering (SipSession session)

在发送注册请求时调用。

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

onRegistrationDone

Added in API level 9
void onRegistrationDone (SipSession session, 
                int duration)

当注册成功完成时调用。

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

onRegistrationFailed

Added in API level 9
void onRegistrationFailed (SipSession session, 
                int errorCode, 
                String errorMessage)

当注册失败时调用。

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

onRegistrationTimeout

Added in API level 9
void onRegistrationTimeout (SipSession session)

当注册超时时调用。

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

onRinging

Added in API level 9
void onRinging (SipSession session, 
                SipProfile caller, 
                String sessionDescription)

在收到INVITE请求时调用。

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

onRingingBack

Added in API level 9
void onRingingBack (SipSession session)

在收到发送的INVITE请求的RINGING响应时调用

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

Hooray!