SinchCall
public final class SinchCall
The SinchCall represents a call.
-
State describes possible states the call can be in
See moreDeclaration
Swift
public enum State : String, CaseIterable -
Direction of the call
See moreDeclaration
Swift
@frozen public enum Direction : String, CaseIterable -
The object that acts as the delegate of the call.
The delegate object handles call state change events and must adopt the SinchCallDelegate protocol.
See also
SinchCallDelegateDeclaration
Swift
public weak var delegate: SinchCallDelegate? { get set } -
String that is used as an identifier for this particular call.
For a call placed with one of the
SinchCallClientdial methods the identifier is assigned by the Sinch platform, so it is empty until the platform has accepted or rejected the dial.Declaration
Swift
public var callId: String { get } -
The id of the remote participant in the call.
Declaration
Swift
public let remoteUserId: String -
Metadata about a call, such as start time.
When a call has ended, the details object contains information about the reason the call ended and error information if the call ended unexpectedly.
See also
SinchCallDetailsDeclaration
Swift
public var details: SinchCallDetails { get } -
The state the call is currently in. It may be one of the following:
SinchCall.State.initiatingSinchCall.State.progressingSinchCall.State.ringingSinchCall.State.answeredSinchCall.State.establishedSinchCall.State.ended
Initially, the call will be in the
SinchCall.State.initiating.Declaration
Swift
public var state: State { get } -
The direction of the call. It may be one of the following:
Declaration
Swift
public let direction: Direction -
Call headers.
Any application-defined call meta-data can be passed via headers.
E.g. a human-readable “display name / username” can be convenient to send as an application-defined header.
Important
If a call is initially received via remote push notifications, headers may not be immediately available due to push payload size limitations (especially pre- iOS 8). If it’s not immediately available, it will be available after the event callbacks SinchCallDelegate.callDidProgress: or SinchCallDelegate.callDidEstablish: .Declaration
Swift
public let headers: [AnyHashable : Any] -
The user data property may be used to associate an arbitrary contextual object with a particular instance of a call.
Declaration
Swift
public var userInfo: Any? -
Answer an incoming call.
Declaration
Swift
public func answer() -
Ends the call, regardless of what state it is in. If the call is an incoming call that has not yet been answered, the call will be reported as denied to the caller.
Declaration
Swift
public func hangup() -
Sends one or more DTMF tones for tone dialing. (Only applicable for calls terminated to PSTN (Publicly Switched Telephone Network)).
return: true if DTMF was sent correctly, false otherwise (e.g. if key is empty or contains an invalid key).
Declaration
Swift
public func sendDTMF(key: String) -> BoolParameters
keyMay be a series of DTMF keys. Each key must be in 0-9, #, *, A-D.
-
Pause video track for this call
Declaration
Swift
public func pauseVideo() -
Start video track for this call
Declaration
Swift
public func resumeVideo()