Suggestions

close search

StringeeCall.StringeeCallListener

public interface StringeeCallListener



Monitors the call's events.



Summary


Public Constructors
StringeeCallListener()

Creates a new StringeeCallListener instance.

Public methods
void onSignalingStateChange(StringeeCall stringeeCall, StringeeCall.SignalingState signalingState, String reason, int sipCode, String sipReason)

Invoked when the call's state changes between: calling, ringing, answered, busy, ended.

void onError(StringeeCall stringeeCall, int code, String description)

Invoked when fails to make a call.

void onHandledOnAnotherDevice(StringeeCall stringeeCall, StringeeCall.SignalingState signalingState, String description)

Invoked when the call is handled on another device.

void onMediaStateChange(StringeeCall stringeeCall, StringeeCall.MediaState mediaState)

Invoked when the call media state changes between: connected, disconnected.

void onLocalStream(StringeeCall stringeeCall)

Invoked when the local media is available to be rendered.

void onRemoteStream(StringeeCall stringeeCall)

Invoked when the remote media is available to be rendered.

void onCallInfo(StringeeCall stringeeCall, JSONObject callInfo)

Invoked when receives data from other clients.


Public constructors


StringeeCallListener

StringeeCallListener()

Creates a new StringeeCallListener instance.



Public methods


onSignalingStateChange

void onSignalingStateChange(StringeeCall stringeeCall, StringeeCall.SignalingState signalingState, String reason, int sipCode, String sipReason)

Invoked when the call's state changes between: calling, ringing, answered, busy, ended.

Parameters
stringeeCall

A StringeeCall instance.

signalingState

The call's state values defined in the StringeeCall.SignalingState enum.

reason

The description of the state.

sipCode

The sip code returned when the call is an app-to-phone call.

sipReason

The description of sip code.



onError

void onError(StringeeCall stringeeCall, int code, String description)

Invoked when fails to make a call.

Parameters
stringeeCall

A StringeeCall instance.

code

The code of the error.

description

The description of the error.


code

description

-1

StringeeClient has not been connected yet

1

ANSWER_URL_EMPTY

2

ANSWER_URL_SCCO_INCORRECT_FORMAT

3

TO_TYPE_IS_NOT_INTERNAL_OR_EXTERNAL

4

FROM_NUMBER_NOT_FOUND

5

FROM_NUMBER_NOT_BELONG_YOUR_ACCOUNT

6

SIP_TRUNK_NOT_FOUND

7

SIP_TRUNK_NOT_BELONG_YOUR_ACCOUNT

8

NOT_ENOUGH_MONEY

9

UNKNOW_ERROR_1

10

FROM_NUMBER_OR_TO_NUMBER_INVALID_FORMAT

11

CALL_NOT_ALLOWED_BY_YOUR_SERVER

12

MAX_CONCURRENT_CALL

13

WAIT_TEXT_TO_SPEECH

14

TO_NUMBER_INVALID

15

FROM_NUMBER_NOT_BELONG_YOUR_PROJECT

16

NOT_ALLOW_CHAT_USER

17

NOT_ALLOW_CALLOUT

18

REQUEST_ANSWER_URL_ERROR

19

ACCOUNT_LOCKED

20

REACH_PLAN_LIMIT

21

MAKE_VIDEO_ROOM_ERROR



onHandledOnAnotherDevice

void onHandledOnAnotherDevice(StringeeCall stringeeCall, StringeeCall.SignalingState signalingState, String description)

Invoked when the call is handled on another device.

Parameters
stringeeCall

A StringeeCall instance.

signalingState

The state of the call on another device.

description

The description of the call state.



onMediaStateChange

void onMediaStateChange(StringeeCall stringeeCall, StringeeCall.MediaState mediaState)

Invoked when the call media state changes between: connected, disconnected.

Parameters
stringeeCall

A StringeeCall instance.

mediaState

The call media state defined in the StringeeCall.MediaState enum.



onLocalStream

void onLocalStream(StringeeCall stringeeCall)

Invoked when the local media is available to be rendered.

Parameters
stringeeCall

A StringeeCall instance.



onRemoteStream

void onRemoteStream(StringeeCall stringeeCall)

Invoked when the remote media is available to be rendered.

Parameters
stringeeCall

A StringeeCall instance.



onCallInfo

void onCallInfo(StringeeCall stringeeCall, JSONObject callInfo)

Invoked when receives data from other clients.

Parameters
stringeeCall

A StringeeCall instance.

callInfo

Data received in JSON format.