Rate this page:

ICallListener

Interface that may be used to handle call events.

Methods

onCallAudioStarted

Copy URL

void

onCallAudioStarted(

ICall

call
)

Invoked after audio is started in the call.

Parameters

  • call:

    ICall

    Call that invoked the event

Returns

  • type:

    void

onCallConnected

Copy URL

void

onCallConnected(

ICall

call,

Map<String, String>

headers
)

Invoked after call was connected.

Parameters

  • call:

    ICall

    Call that invoked the event

  • headers:

    Map<String, String>

    Optional SIP headers received with message

Returns

  • type:

    void

onCallDisconnected

Copy URL

void

onCallDisconnected(

ICall

call,

Map<String, String>

headers,

boolean

answeredElsewhere
)

Invoked after the call was disconnected.

Parameters

  • call:

    ICall

    Call that invoked the event

  • headers:

    Map<String, String>

    Optional SIP headers received with message

  • answeredElsewhere:

    boolean

    True if the call was answered on another device via SIP forking, false otherwise

Returns

  • type:

    void

onCallFailed

Copy URL

void

onCallFailed(

ICall

call,

int

code,

String

description,

Map<String, String>

headers
)

Invoked if call us failed.

Parameters

  • call:

    ICall

    Call that invoked the event

  • code:

    int

    Status code of the call failure

  • description:

    String

    Status message of the call failure

  • headers:

    Map<String, String>

    Optional SIP headers received with message

Returns

  • type:

    void

onCallReconnected

Since ver. 2.29.0
Copy URL

void

onCallReconnected(

ICall

call
)

Invoked if the connection to the Voximplant Cloud is restored and media stream are active in the call.

Parameters

  • call:

    ICall

    Call that invoked the event

Returns

  • type:

    void

onCallReconnecting

Since ver. 2.29.0
Copy URL

void

onCallReconnecting(

ICall

call
)

Invoked if the connection to the Voximplant Cloud is lost due to a network issue and media streams may be interrupted in the call.

Once the connection to the Voximplant Cloud is restored and media streams are active, ICallListener.onCallReconnected(ICall) event will be invoked.

Until ICallListener.onCallReconnected(ICall) event is invoked, the following API calls will fail with CallError.RECONNECTING error:

  1. ICall.sendVideo(boolean, ICallCompletionHandler)
  2. ICall.receiveVideo(ICallCompletionHandler)
  3. ICall.hold(boolean, ICallCompletionHandler)
  4. ICall.startScreenSharing(Intent, ICallCompletionHandler)

Until ICallListener.onCallReconnected(ICall) event is invoked, the following events will not be invoked:

  1. ICallListener.onCallStatsReceived(ICall, CallStats)
  2. any events from IQualityIssueListener

While the call is reconnecting, all previously detected quality issues (if any) are reset and their QualityIssueLevel is set to QualityIssueLevel.NONE

Parameters

  • call:

    ICall

    Call that invoked the event

Returns

  • type:

    void

onCallRinging

Copy URL

void

onCallRinging(

ICall

call,

Map<String, String>

headers
)

Call ringing. You should start playing call progress tone now.

Parameters

  • call:

    ICall

    Call that invoked the event

  • headers:

    Map<String, String>

    Optional SIP headers received with message

Returns

  • type:

    void

onCallStatsReceived

Copy URL

void

onCallStatsReceived(

ICall

call,

CallStats

callStats
)

Invoked periodically with interval configured with ClientConfig.statsCollectionInterval with call statistics

Parameters

  • call:

    ICall

    Call that invoked the event

  • callStats:

    CallStats

    Call statistics

Returns

  • type:

    void

onEndpointAdded

Copy URL

void

onEndpointAdded(

ICall

call,

IEndpoint

endpoint
)

Invoked when new endpoint is added to the call. It is recommended to set IEndpointListener for the new endpoint, when this event is triggered.

Parameters

Returns

  • type:

    void

onICECompleted

Copy URL

void

onICECompleted(

ICall

call
)

Invoked when ICE connection is complete.

Parameters

  • call:

    ICall

    Call that invoked the event

Returns

  • type:

    void

onICETimeout

Copy URL

void

onICETimeout(

ICall

call
)

Invoked if connection was not established due to a network connection problem between 2 peers.

Parameters

  • call:

    ICall

    Call that invoked the event

Returns

  • type:

    void

onLocalVideoStreamAdded

Copy URL

void

onLocalVideoStreamAdded(

ICall

call,

ILocalVideoStream

videoStream
)

Invoked when local video is added to the call.

Parameters

Returns

  • type:

    void

onLocalVideoStreamRemoved

Copy URL

void

onLocalVideoStreamRemoved(

ICall

call,

ILocalVideoStream

videoStream
)

Invoked when local video is removed from the call.

Parameters

Returns

  • type:

    void

onMessageReceived

Copy URL

void

onMessageReceived(

ICall

call,

String

text
)

Invoked when message is received within the call.

Implemented atop SIP INFO for communication between call endpoint and Voximplant cloud, and is separated from Voximplant messaging API.

Parameters

  • call:

    ICall

    Call that invoked the event

  • text:

    String

    Content of the message

Returns

  • type:

    void

onSIPInfoReceived

Copy URL

void

onSIPInfoReceived(

ICall

call,

String

type,

String

content,

Map<String, String>

headers
)

Invoked when INFO message is received.

Parameters

  • call:

    ICall

    Call that invoked the event

  • type:

    String

    MIME type of INFO message

  • content:

    String

    Body of INFO message

  • headers:

    Map<String, String>

    Optional SIP headers received with message

Returns

  • type:

    void