ICallListener
Interface that may be used to handle call events.
Methods
onCallAudioStarted
void
onCallAudioStarted( call)
Invoked after audio is started in the call.
Parameters
call:
Call that invoked the event
Returns
type:
void
onCallConnected
void
onCallConnected( call, Map<String, String>
headers)
Invoked after call was connected.
Parameters
call:
Call that invoked 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)
Invoked after the call was disconnected.
Parameters
call:
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
void
onCallFailed( call, int
code, String
description, Map<String, String>
headers)
Invoked if call us failed.
Parameters
call:
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
void
onCallReconnected( call)
Invoked if the connection to the Voximplant Cloud is restored and media stream are active in the call.
Parameters
call:
Call that invoked the event
Returns
type:
void
onCallReconnecting
void
onCallReconnecting( 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:
- ICall.sendVideo(boolean, ICallCompletionHandler)
- ICall.receiveVideo(ICallCompletionHandler)
- ICall.hold(boolean, ICallCompletionHandler)
- ICall.startScreenSharing(Intent, ICallCompletionHandler)
Until ICallListener.onCallReconnected(ICall) event is invoked, the following events will not be invoked:
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 invoked the event
Returns
type:
void
onCallRinging
void
onCallRinging( call, Map<String, String>
headers)
Call ringing. You should start playing call progress tone now.
Parameters
call:
Call that invoked the event
headers:
Map<String, String>
Optional SIP headers received with message
Returns
type:
void
onCallStatsReceived
void
onCallStatsReceived( call, callStats)
Invoked periodically with interval configured with ClientConfig.statsCollectionInterval with call statistics
Returns
type:
void
onEndpointAdded
void
onEndpointAdded( call, 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.
Returns
type:
void
onICECompleted
void
onICECompleted( call)
Invoked when ICE connection is complete.
Parameters
call:
Call that invoked the event
Returns
type:
void
onICETimeout
void
onICETimeout( call)
Invoked if connection was not established due to a network connection problem between 2 peers.
Parameters
call:
Call that invoked the event
Returns
type:
void
onLocalVideoStreamAdded
void
onLocalVideoStreamAdded( call, videoStream)
Invoked when local video is added to the call.
Parameters
call:
Call that invoked the event
videoStream:
Local video stream
Returns
type:
void
onLocalVideoStreamRemoved
void
onLocalVideoStreamRemoved( call, videoStream)
Invoked when local video is removed from the call.
Parameters
call:
Call that invoked the event
videoStream:
Local video stream
Returns
type:
void
onMessageReceived
void
onMessageReceived( 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:
Call that invoked the event
text:
String
Content of the message
Returns
type:
void
onSIPInfoReceived
void
onSIPInfoReceived( call, String
type, String
content, Map<String, String>
headers)
Invoked when INFO message is received.
Parameters
call:
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