SINCall

Objective-C

@protocol SINCall <NSObject>

Swift

protocol SINCall : NSObjectProtocol

The SINCall represents a call.

  • The object that acts as the delegate of the call.

    The delegate object handles call state change events and must adopt the SINCallDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, readwrite) id<SINCallDelegate> delegate;

    Swift

    weak var delegate: SINCallDelegate! { get set }
  • String that is used as an identifier for this particular call.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *callId;

    Swift

    var callId: String! { get }
  • The id of the remote participant in the call.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *remoteUserId;

    Swift

    var remoteUserId: String! { get }
  • 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.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<SINCallDetails> details;
  • The state the call is currently in. It may be one of the following:

    • SINCallStateInitiating
    • SINCallStateProgressing
    • SINCallStateEstablished
    • SINCallStateEnded

    Initially, the call will be in the SINCallStateInitiating state.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly) SINCallState state;

    Swift

    var state: SINCallState { get }
  • The direction of the call. It may be one of the following:

    • SINCallDirectionIncoming
    • SINCallDirectionOutgoing

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly)
        SINCallDirection direction;

    Swift

    var direction: SINCallDirection { get }
  • 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 -[SINCallDelegate callDidProgress:] or -[SINCallDelegate callDidEstablish:] .

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDictionary *headers;

    Swift

    var headers: [AnyHashable : Any]! { get }
  • The user data property may be used to associate an arbitrary contextual object with a particular instance of a call.

    Declaration

    Objective-C

    @property (nonatomic, strong, readwrite) id userInfo;

    Swift

    var userInfo: Any! { get set }
  • Answer an incoming call.

    Declaration

    Objective-C

    - (void)answer;

    Swift

    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

    Objective-C

    - (void)hangup;

    Swift

    func hangup()
  • Sends a DTMF tone for tone dialing. (Only applicable for calls terminated to PSTN (Publicly Switched Telephone Network)).

    Throws

    NSInvalidArgumentException if key does not have a valid mapping to a DTMF tone.

    Declaration

    Objective-C

    - (void)sendDTMF:(NSString *)key;

    Swift

    func sendDTMF(_ key: String!)

    Parameters

    key

    DTMF key must be in [0-9, #, *, A-D].

  • Pause video track for this call

    Declaration

    Objective-C

    - (void)pauseVideo;

    Swift

    func pauseVideo()
  • Start video track for this call

    Declaration

    Objective-C

    - (void)resumeVideo;

    Swift

    func resumeVideo()