VICallDelegate
Delegate that may be used to handle the call events.
Methods
call:didAddEndpoint:
- (void
)call:(VICall *
)call
didAddEndpoint:()endpoint
Triggered after an endpoint is added to the call.
Parameters
call:
VICall *
Call that triggered the event
endpoint:
Endpoint that has been added to the call
Returns
type:
void
call:didAddLocalVideoStream:
- (void
)call:(VICall *
)call
didAddLocalVideoStream:()videoStream
Triggered when a local video stream is added to the call. The event is triggered on the main thread.
Parameters
call:
VICall *
Call that triggered the event
videoStream:
Local video stream that is added to the call
Returns
type:
void
call:didConnectWithHeaders:
- (void
)call:(VICall *
)call
didConnectWithHeaders:(nullable NSDictionary *
)headers
Triggered after a call has been successfully connected.
Parameters
call:
VICall *
Call that triggered the event
headers:
nullable NSDictionary *
Optional headers passed with the event
Returns
type:
void
call:didDisconnectWithHeaders:answeredElsewhere:
- (void
)call:(VICall *
)call
didDisconnectWithHeaders:(nullable NSDictionary *
)headers
answeredElsewhere:(NSNumber *
)answeredElsewhere
Triggered after a call has been disconnected.
Parameters
call:
VICall *
Call that triggered the event
headers:
nullable NSDictionary *
Optional headers passed with the event
answeredElsewhere:
NSNumber *
Whether the call has been answered on another device
Returns
type:
void
call:didFailWithError:headers:
- (void
)call:(VICall *
)call
didFailWithError:(NSError *
)error
headers:(nullable NSDictionary *
)headers
Triggered if a call failed.
Parameters
call:
VICall *
Call that triggered the event
error:
NSError *
Error that contains status code and status message of the call failure. See VICallFailErrorCode for possible reasons
headers:
nullable NSDictionary *
Optional headers passed with the event
Returns
type:
void
call:didReceiveInfo:type:headers:
- (void
)call:(VICall *
)call
didReceiveInfo:(NSString *
)body
type:(NSString *
)type
headers:(nullable NSDictionary *
)headers
Triggered when an INFO message is received within the call.
Parameters
call:
VICall *
Call that triggered the event
body:
NSString *
Body of INFO message
type:
NSString *
MIME type of INFO message
headers:
nullable NSDictionary *
Optional headers passed with the event
Returns
type:
void
call:didReceiveMessage:headers:
- (void
)call:(VICall *
)call
didReceiveMessage:(NSString *
)message
headers:(nullable NSDictionary *
)headers
Triggered when a message is received within a call. Implemented atop of SIP INFO for communication between the call endpoint and the Voximplant Cloud, and is separated from Voximplant messaging API.
Parameters
call:
VICall *
Call that triggered the event
message:
NSString *
Content of the message
headers:
nullable NSDictionary *
Optional headers passed with the event
Returns
type:
void
call:didReceiveStatistics:
- (void
)call:(VICall *
)call
didReceiveStatistics:()stat
Triggered when call statistics are available for the call.
Parameters
call:
VICall *
Call that triggered the event
stat:
Call statistics
Returns
type:
void
callDidReconnect:
- (void
)callDidReconnect:(VICall *
)call
Triggered if the connection to the Voximplant Cloud is restored and media stream are active in the call.
Parameters
call:
VICall *
Call that triggered the event
Returns
type:
void
call:didRemoveLocalVideoStream:
- (void
)call:(VICall *
)call
didRemoveLocalVideoStream:()videoStream
Triggered when a local video stream is removed from the call. The event is triggered on the main thread.
Parameters
call:
VICall *
Call that triggered the event
videoStream:
Local video stream that is removed from the call
Returns
type:
void
callDidStartAudio:
- (void
)callDidStartAudio:(VICall *
)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 [VICallDelegate call:startRingingWithHeaders:] event.
Parameters
call:
VICall *
Call that triggered the event
Returns
type:
void
callDidStartReconnecting:
- (void
)callDidStartReconnecting:(VICall *
)call
Triggered 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 the media streams are active, [VICallDelegate callDidReconnect:] event is invoked.
Until [VICallDelegate callDidReconnect:] event is invoked, the following API calls fail with VICallErrorCodeReconnecting error:
- [VICall setSendVideo:completion:]
- [VICall startReceiveVideoWithCompletion:]
- [VICall setHold:completion:]
- [VICall startInAppScreenSharing:]
Until [VICallDelegate callDidReconnect:] event is invoked, the following events are not invoked:
- [VICallDelegate call:didReceiveStatistics:]
- any events from VIQualityIssueDelegate
While the call is reconnecting, all previously detected quality issues (if any) are reset and their VIQualityIssueLevel is set to VIQualityIssueLevelNone
Parameters
call:
VICall *
Call that triggered the event
Returns
type:
void
call:startRingingWithHeaders:
- (void
)call:(VICall *
)call
startRingingWithHeaders:(nullable NSDictionary *
)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:
VICall *
Call that triggered the event
headers:
nullable NSDictionary *
Optional headers passed with the event
Returns
type:
void