ICallListener
Interface that provides API to handle call events.
Methods
onCallAudioStarted
void
 onCallAudioStarted( 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:
Call that triggered the event
Returns
type:
void
onCallConnected
void
 onCallConnected( call, Map<String, String>
 headers)Triggered if a call has been connected.
Parameters
call:
Call that triggered the event
headers:
Map<String, String>
Optional SIP headers received with message
Returns
type:
void
onCallDisconnected
void
 onCallDisconnected( call, Map<String, String>
 headers, boolean
 answeredElsewhere)Triggered if a call has been disconnected.
Parameters
call:
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
void
 onCallFailed( call, int
 code, String
 description, Map<String, String>
 headers)Triggered if a call has failed.
Parameters
call:
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
void
 onCallReconnected( call)Triggered if the connection to the Voximplant Cloud is restored and media streams are active in the call.
Parameters
call:
Call that triggered the event
Returns
type:
void
onCallReconnecting
void
 onCallReconnecting( 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:
- ICall.sendVideo(boolean, ICallCompletionHandler)
 - ICall.receiveVideo(ICallCompletionHandler)
 - ICall.hold(boolean, ICallCompletionHandler)
 - ICall.startScreenSharing(Intent, ICallCompletionHandler)
 
Until ICallListener.onCallReconnected(ICall) event is triggered, the following events are not triggered:
While the call is reconnecting, all previously detected quality issues (if any) are reset and their QualityIssueLevel is set to QualityIssueLevel.NONE
Parameters
call:
Call that triggered the event
Returns
type:
void
onCallRinging
void
 onCallRinging( 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:
Call that triggered the event
headers:
Map<String, String>
Optional SIP headers received with message
Returns
type:
void
onCallStatsReceived
void
 onCallStatsReceived( call,  callStats)Triggered periodically when call statistics are received with an interval configured in ClientConfig.statsCollectionInterval
Returns
type:
void
onEndpointAdded
void
 onEndpointAdded( call,  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.
Returns
type:
void
onICECompleted
void
 onICECompleted( call)Triggered if the ICE connection is complete.
Parameters
call:
Call that triggered the event
Returns
type:
void
onICETimeout
void
 onICETimeout( call)Triggered if the connection has not been established due to a network connection problem between 2 peers.
Parameters
call:
Call that triggered the event
Returns
type:
void
onLocalVideoStreamAdded
void
 onLocalVideoStreamAdded( call,  videoStream)Triggered if the local video is added to a call.
Parameters
call:
Call that triggered the event
videoStream:
Local video stream
Returns
type:
void
onLocalVideoStreamRemoved
void
 onLocalVideoStreamRemoved( call,  videoStream)Triggered if the local video is removed from a call.
Parameters
call:
Call that triggered the event
videoStream:
Local video stream
Returns
type:
void
onMessageReceived
void
 onMessageReceived( 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:
Call that triggered the event
text:
String
Content of the message
Returns
type:
void
onSIPInfoReceived
void
 onSIPInfoReceived( call, String
 type, String
 content, Map<String, String>
 headers)Triggered if an INFO message is received.
Parameters
call:
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