Rate this page:

ICallListener

Interface that provides API to handle call events.

Methods

onCallAudioStarted

Copy URL

void

onCallAudioStarted(

ICall

call
)

Triggered when the Call.answer or Call.startEarlyMedia method is called on the scenario side. After receiving this event, the application should stop playing progress tones if they have been playing after the onCallRinging event.

Parameters

  • call:

    ICall

    Call that triggered the event

Returns

  • type:

    void

onCallConnected

Copy URL

void

onCallConnected(

ICall

call,

Map<String, String>

headers
)

Triggered if a call has been connected.

Parameters

  • call:

    ICall

    Call that triggered 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
)

Triggered if a call has been disconnected.

Parameters

  • call:

    ICall

    Call that triggered the event

  • headers:

    Map<String, String>

    Optional SIP headers received with message

  • answeredElsewhere:

    boolean

    Whether the call has been answered on another device via SIP forking

Returns

  • type:

    void

onCallFailed

Copy URL

void

onCallFailed(

ICall

call,

int

code,

String

description,

Map<String, String>

headers
)

Triggered if a call has failed.

Parameters

  • call:

    ICall

    Call that triggered 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
)

Triggered if the connection to the Voximplant Cloud is restored and media streams are active in the call.

Parameters

  • call:

    ICall

    Call that triggered the event

Returns

  • type:

    void

onCallReconnecting

Since ver. 2.29.0
Copy URL

void

onCallReconnecting(

ICall

call
)

Triggered if the connection to the Voximplant Cloud is lost due to a network issue, 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 is triggered.

Until ICallListener.onCallReconnected(ICall) event is triggered, the following API calls fails 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 triggered, the following events are not triggered:

  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 triggered the event

Returns

  • type:

    void

onCallRinging

Copy URL

void

onCallRinging(

ICall

call,

Map<String, String>

headers
)

Triggered when the Call.ring method is called on the scenario side. Usually, this event is triggered when the call is arrived to its destination. After receiving this event, the application should start playing progress tones.

Parameters

  • call:

    ICall

    Call that triggered the event

  • headers:

    Map<String, String>

    Optional SIP headers received with message

Returns

  • type:

    void

onCallStatsReceived

Copy URL

void

onCallStatsReceived(

ICall

call,

CallStats

callStats
)

Triggered periodically when call statistics are received with an interval configured in ClientConfig.statsCollectionInterval

Parameters

  • call:

    ICall

    Call that triggered the event

  • callStats:

    CallStats

    Call statistics

Returns

  • type:

    void

onEndpointAdded

Copy URL

void

onEndpointAdded(

ICall

call,

IEndpoint

endpoint
)

Triggered if a new endpoint is added to a call. It is recommended to set an IEndpointListener for the new endpoint, when this event is triggered.

Parameters

Returns

  • type:

    void

onICECompleted

Copy URL

void

onICECompleted(

ICall

call
)

Triggered if the ICE connection is complete.

Parameters

  • call:

    ICall

    Call that triggered the event

Returns

  • type:

    void

onICETimeout

Copy URL

void

onICETimeout(

ICall

call
)

Triggered if the connection has not been established due to a network connection problem between 2 peers.

Parameters

  • call:

    ICall

    Call that triggered the event

Returns

  • type:

    void

onLocalVideoStreamAdded

Copy URL

void

onLocalVideoStreamAdded(

ICall

call,

ILocalVideoStream

videoStream
)

Triggered if the local video is added to a call.

Parameters

Returns

  • type:

    void

onLocalVideoStreamRemoved

Copy URL

void

onLocalVideoStreamRemoved(

ICall

call,

ILocalVideoStream

videoStream
)

Triggered if the local video is removed from a call.

Parameters

Returns

  • type:

    void

onMessageReceived

Copy URL

void

onMessageReceived(

ICall

call,

String

text
)

Triggered if a message is received within a 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 triggered 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
)

Triggered if an INFO message is received.

Parameters

  • call:

    ICall

    Call that triggered 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