Call
public class CallA Call represents a media call on Cisco Webex.
The application can create an outgoing Call by calling Phone.dial(...) function:
    let address = "coworker@example.com"
    let localVideoView = MediaRenderView()
    let remoteVideoView = MediaRenderView()
    let mediaOption = MediaOption.audioVideo(local: localVideoView, remote: remoteVideoView)
    webex.phone.dial(address, option:mediaOption) {
      switch ret {
      case .success(let call):
        // success
        call.onConnected = {
        }
        call.onDisconnected = { reason in
        }
      case .failure(let error):
        // failure
      }
    }
The application can receive an incoming Call on Phone.onIncoming function:
    webex.phone.onIncoming = { call in
      call.answer(option: mediaOption) { error in
        if let error = error {
          // success
        }
        else {
          // failure
        }
      }
    }
See
see Phone API about how to create calls.See
CallStatus for the states and transitions of aCall.
Since
1.2.0- 
                  
                  DeclarationSwift public enum Direction
- 
                  
                  DeclarationSwift public enum DisconnectReason
- 
                  
                  DeclarationSwift public enum MediaChangedEvent
- 
                  
                  DeclarationSwift public enum CallMembershipChangedEvent
- 
                  
                  DeclarationSwift public enum iOSBroadcastingEvent
- 
                  
                  DeclarationSwift public enum Capabilities
- 
                  
                  DeclarationSwift public enum WaitReason
- 
                  
                  The options to specify how the video adjusts its content to be render in a view. See moreSince 2.6.0DeclarationSwift public enum VideoRenderMode
- 
                  
                  Callback when remote participant(s) is ringing. Since 1.2.0DeclarationSwift public var onRinging: (() -> Void)? { get set }
- 
                  
                  Callback when the call is waiting. Since 2.4.0DeclarationSwift public var onWaiting: ((WaitReason) -> Void)? { get set }
- 
                  
                  Callback when remote participant(s) answered and this Callis connected.Since 1.2.0DeclarationSwift public var onConnected: (() -> Void)? { get set }
- 
                  
                  Callback when this Callis disconnected (hangup, cancelled, get declined or other self device pickup the call).Since 1.2.0DeclarationSwift public var onDisconnected: ((DisconnectReason) -> Void)?
- 
                  
                  Callback when the memberships of this Callhave changed.Since 1.3.0DeclarationSwift public var onCallMembershipChanged: ((CallMembershipChangedEvent) -> Void)?
- 
                  
                  Callback when the media types of this Callhave changed.Since 1.2.0DeclarationSwift public var onMediaChanged: ((MediaChangedEvent) -> Void)?
- 
                  
                  Callback when the capabilities of this Callhave changed.Since 1.2.0DeclarationSwift public var onCapabilitiesChanged: ((Capabilities) -> Void)?
- 
                  
                  Callback when the iOS broadcasting status of this Callhave changed.Since 1.4.0DeclarationSwift public var oniOSBroadcastingChanged: ((iOSBroadcastingEvent) -> Void)?
- 
                  
                  Callback when the Callis scheduled call and the schedules of the call has been changed.Since 2.6.0DeclarationSwift public var onScheduleChanged: ((Call) -> Void)?
- 
                  
                  Multi stream feature observer protocol. Client need to set the protocol implemention into certain call. See see MultiStreamObserverSince 2.0.0DeclarationSwift public var multiStreamObserver: MultiStreamObserver?
- 
                  
                  The status of this Call.See CallStatusSince 1.2.0DeclarationSwift public internal(set) var status: CallStatus { get set }
- 
                  
                  The direction of this Call.Since 1.2.0DeclarationSwift public private(set) var direction: Direction { get }
- 
                  
                  True if the DTMF keypad is enabled for this Call. Otherwise, false.Since 1.2.0DeclarationSwift public var sendingDTMFEnabled: Bool { get }
- 
                  
                  True if the remote party of this Callis sending video. Otherwise, false.Since 1.2.0DeclarationSwift public var remoteSendingVideo: Bool { get }
- 
                  
                  True if the remote party of this Callis sending audio. Otherwise, false.Since 1.2.0DeclarationSwift public var remoteSendingAudio: Bool { get }
- 
                  
                  True if the remote party of this Callis sending screen share. Otherwise, false.Since 1.3.0DeclarationSwift public var remoteSendingScreenShare: Bool { get }
- 
                  
                  True if the local party of this Callis sending video. Otherwise, false.Since 1.2.0DeclarationSwift public var sendingVideo: Bool { get set }
- 
                  
                  True if this Callis sending audio. Otherwise, false.Since 1.2.0DeclarationSwift public var sendingAudio: Bool { get set }
- 
                  
                  True if the local party of this Callis sending screen share. Otherwise, false.Since 1.4.0DeclarationSwift public var sendingScreenShare: Bool { get set }
- 
                  
                  True if the local party of this Callis receiving video. Otherwise, false.Since 1.2.0DeclarationSwift public var receivingVideo: Bool { get set }
- 
                  
                  True if the local party of this Callis receiving audio. Otherwise, false.Since 1.2.0DeclarationSwift public var receivingAudio: Bool { get set }
- 
                  
                  True if the local party of this Callis receiving screen share. Otherwise, false.Since 1.3.0DeclarationSwift public var receivingScreenShare: Bool { get set }
- 
                  
                  True if the loud speaker is selected as the audio output device for this Call. Otherwise, false.Since 1.2.0DeclarationSwift public var isSpeaker: Bool { get set }
- 
                  
                  The camera facing mode selected for this Call.Since 1.2.0DeclarationSwift public var facingMode: Phone.FacingMode { get set }
- 
                  
                  The local video render view dimensions (points) of this Call.Since 1.2.0DeclarationSwift public var localVideoViewSize: CMVideoDimensions { get }
- 
                  
                  The remote video render view dimensions (points) of this Call.Since 1.2.0DeclarationSwift public var remoteVideoViewSize: CMVideoDimensions { get }
- 
                  
                  The remote screen share render view dimensions (points) of this Call.Since 1.3.0DeclarationSwift public var remoteScreenShareViewSize: CMVideoDimensions { get }
- 
                  
                  The local screen share render view dimensions (points) of this Call.Since 1.4.0DeclarationSwift public var localScreenShareViewSize: CMVideoDimensions { get }
- 
                  
                  Specify how the remote video adjusts its content to be render in a view. Since 2.6.0DeclarationSwift public var remoteVideoRenderMode: VideoRenderMode { get set }
- 
                  
                  The video layout for the active speaker and other attendees in the group video meeting. Note videoLayout is deprecated. UsecompositedVideoLayoutinstead, they do the same thing, just changed the namingSince 2.6.0DeclarationSwift @available(*, deprecated) public var videoLayout: MediaOption.CompositedVideoLayout? { get set }
- 
                  
                  The composited video layout for the active speaker and other attendees in the group video meeting. Since 2.8.0DeclarationSwift public var compositedVideoLayout: MediaOption.CompositedVideoLayout? { get set }
- 
                  
                  Set the composited video layout with callback for the active speaker and other attendees in the group video meeting. Note the layout just affects when Phone.videoStreamModeiscompositedSince 2.8.0 DeclarationSwift public func setCompositedVideoLayout(_ layout: MediaOption.CompositedVideoLayout, completionHandler: @escaping (Error?) -> Void)Parameterslayoutthe video layout mode. completionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. 
- 
                  
                  Call Memberships represent participants in this Call.Since 1.2.0DeclarationSwift public private(set) var memberships: [CallMembership] { get set }
- 
                  
                  The initiator of this Call.Since 1.2.0DeclarationSwift public var from: CallMembership? { get }
- 
                  
                  The intended recipient of this Call.Since 1.2.0DeclarationSwift public var to: CallMembership? { get }
- 
                  
                  Returns the associated Space of this Call.Since 2.6.0DeclarationSwift public var spaceId: String? { get }
- 
                  
                  Returns the schedules of this call if this call has one or more schedules. Since 2.6.0DeclarationSwift public private(set) var schedules: [CallSchedule]? { get }
- 
                  
                  A local unique identifier of a Callfor Apple CallKit.Since 1.2.0DeclarationSwift public var uuid: UUID
- 
                  
                  The render views for local and remote video of this call. If is nil, it will update the video state as inactive to the server side. Since 1.3.0DeclarationSwift public var videoRenderViews: (local: MediaRenderView, remote: MediaRenderView)? { get set }
- 
                  
                  The render view for the remote screen share of this call. If is nil, it will update the screen sharing state as inactive to the server side. Since 1.3.0DeclarationSwift public var screenShareRenderView: MediaRenderView? { get set }
- 
                  
                  Get all opened auxiliary streams. See see AuxStreamSince 2.0.0DeclarationSwift public lazy private(set) var auxStreams: Array<AuxStream> { get set }
- 
                  
                  Speaking CallMembershipin meeting Video presented on remote media render view.See see CallMembership.isActiveSpeakerSince 2.0.0DeclarationSwift public internal(set) var activeSpeaker: CallMembership? { get }
- 
                  
                  Available auxiliary stream count. Since 2.0.0DeclarationSwift public private(set) var availableAuxStreamCount: Int { get set }
- 
                  
                  Acknowledge (without answering) an incoming call. Will cause the initiator’s Call instance to emit the ringing event. See see CallStatusSince 1.2.0DeclarationSwift public func acknowledge(completionHandler: @escaping (Error?) -> Void)ParameterscompletionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Answers this call. This can only be invoked when this call is incoming and in ringing status. See see CallStatusSince 1.2.0DeclarationSwift public func answer(option: MediaOption, completionHandler: @escaping (Error?) -> Void)ParametersoptionIntended media options - audio only or audio and video - for the call. completionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Rejects this call. This can only be invoked when this call is incoming and in ringing status. Since 1.2.0See see CallStatusDeclarationSwift public func reject(completionHandler: @escaping (Error?) -> Void)ParameterscompletionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Disconnects this call. This can only be invoked when this call is in answered status. Since 1.2.0See see CallStatusDeclarationSwift public func hangup(completionHandler: @escaping (Error?) -> Void)ParameterscompletionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Admit CallMemberships into the meeting from the lobby. This should be called by moderator. Since 2.4.0DeclarationSwift public func letIn(_ memberships: [CallMembership], completionHandler: @escaping (Error?) -> Void)Parametersmembershipsthe call memberships that waiting in the lobby. completionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Sends feedback for this call to Cisco Webex team. Since 1.2.0DeclarationSwift public func sendFeedbackWith(rating: Int, comments: String? = nil, includeLogs: Bool = false)ParametersratingThe rating of the quality of this call between 1 and 5 where 5 means excellent quality. commentsThe comments for this call. includeLogsTrue if to include logs, False as not. Return ValueVoid 
- 
                  
                  Sends DTMF events to the remote party. Valid DTMF events are 0-9, *, #, a-d, and A-D. Since 1.2.0DeclarationSwift public func send(dtmf: String, completionHandler: ((Error?) -> Void)?)Parametersdtmfany combination of valid DTMF events matching regex mattern “^[0-9#*abcdABCD]+$” completionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Start screen sharing in this call. Since 1.4.0DeclarationSwift @available(iOS 11.2, *) public func startSharing(completionHandler: @escaping (Error?) -> Void)ParameterscompletionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Stop screen sharing in this call. Since 1.4.0DeclarationSwift @available(iOS 11.2, *) public func stopSharing(completionHandler: @escaping (Error?) -> Void)ParameterscompletionHandlerA closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil. Return ValueVoid 
- 
                  
                  Open one auxiliary stream with a media render view. The Maximum number of auxiliary videos could be opened is 4. When one auxiliary streams manually closed, could call this API to reopen. Result will call back through auxStreamOpenedEvent See see AuxStreamChangeEvent.auxStreamOpenedEventSince 2.0.0DeclarationSwift public func openAuxStream(view: MediaRenderView)Parametersviewthe auxiliary display view. Return ValueVoid 
- 
                  
                  Close one auxiliary stream with the indicated media render view. Result will call back throuhd auxStreamClosedEvent. See see AuxStreamChangeEvent.auxStreamClosedEventSince 2.0.0DeclarationSwift public func closeAuxStream(view: MediaRenderView)Parametersviewthe auxiliary stream’s render view that will be closed. Return ValueVoid 
- 
                  
                  Update audio session for CallKit. This must be called on provider:didActivateAudioSession: to reactivate the audio session. Since 1.3.0DeclarationSwift func updateAudioSession()
 View on GitHub
View on GitHub Call Class Reference
        Call Class Reference