Suggestions

close search

StringeeCall2.StringeeCallListener

public interface StringeeCallListener



Monitors the call's event.



Summary


Public Constructors
StringeeCallListener()

Creates a new StringeeCallListener instance.

Public methods
void onSignalingStateChange(StringeeCall2 stringeeCall2, StringeeCall2.SignalingState signalingState, String reason, int sipCode, String sipReason)

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

void onError(StringeeCall2 stringeeCall2, int code, String description)

Invoked when fails to make a call.

void onHandledOnAnotherDevice(StringeeCall2 stringeeCall2, StringeeCall2.SignalingState signalingState, String description)

Invoked when the call is handled on another device.

void onMediaStateChange(StringeeCall2 stringeeCall2, StringeeCall2.MediaState mediaState)

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

void onLocalStream(StringeeCall2 stringeeCall2)

Invoked when the local media is available to be rendered.

void onRemoteStream(StringeeCall2 stringeeCall2)

Invoked when the remote media is available to be rendered.

void onVideoTrackAdded(StringeeVideoTrack videoTrack)

Invoked when the new video track is added to call.

void onVideoTrackRemoved(StringeeVideoTrack videoTrack)

Invoked when the new video track is removed from call.

void onCallInfo(StringeeCall2 stringeeCall2, JSONObject callInfo)

Invoked when receives data from other clients.


Public constructors


StringeeCallListener

StringeeCallListener()

Creates a new StringeeCallListener instance.



Public methods


onSignalingStateChange

void onSignalingStateChange(StringeeCall2 stringeeCall2, StringeeCall2.SignalingState signalingState, String reason, int sipCode, String sipReason)

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

Parameters
stringeeCall2

A StringeeCall2 instance.

signalingState

The call's state values defined in the StringeeCall2.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(StringeeCall2 stringeeCall2, int code, String description)

Invoked when fails to make a call.

Parameters
stringeeCall2

A StringeeCall2 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(StringeeCall2 stringeeCall2, StringeeCall2.SignalingState signalingState, String description)

Invoked when the call is handled on another device.

Parameters
stringeeCall2

A StringeeCall2 instance.

signalingState

The state of the call on another device.

description

The description of the call state.



onMediaStateChange

void onMediaStateChange(StringeeCall2 stringeeCall2, StringeeCall2.MediaState mediaState)

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

Parameters
stringeeCall2

A StringeeCall2 instance.

mediaState

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



onLocalStream

void onLocalStream(StringeeCall2 stringeeCall2)

Invoked when the local media is available to be rendered.

Parameters
stringeeCall2

A StringeeCall2 instance.



onRemoteStream

void onRemoteStream(StringeeCall2 stringeeCall2)

Invoked when the remote media is available to be rendered.

Parameters
stringeeCall2

A StringeeCall2 instance.



onVideoTrackAdded

void onVideoTrackAdded(StringeeVideoTrack videoTrack)

Invoked when the new video track is added to call.

Parameters
videoTrack

A StringeeVideoTrack instance.



onVideoTrackRemoved

void onVideoTrackRemoved(StringeeVideoTrack videoTrack)

Invoked when the new video track is removed to call.

Parameters
videoTrack

A StringeeVideoTrack instance.



onCallInfo

void onCallInfo(StringeeCall2 stringeeCall2, JSONObject callInfo)

Invoked when receives data from other clients.

Parameters
stringeeCall2

A StringeeCall2 instance.

callInfo

Data received in JSON format.