Phone

public class Phone

Phone represents a Cisco Webex calling device. The application can obtain a phone object from Webex object and use phone to call other Cisco Webex users or PSTN when enabled. The phone must be registered before it can make or receive calls.

    webex.phone.register() { error in
      if let error = error {
        ... // Device was not registered, and no calls can be sent or received
      } else {
        ... // Successfully registered device
      }
    }

Since

1.2.0
  • The enumeration of Camera facing modes.

    Since

    1.2.0
    See more

    Declaration

    Swift

    public enum FacingMode
  • The enumeration of common bandwidth choices.

    Since

    1.3.0
    See more

    Declaration

    Swift

    public enum DefaultBandwidth : UInt32
  • The enumeration of advanced settings. These settings are for special use cases and usually do not need to be set.

    Since

    2.6.0
    See more

    Declaration

    Swift

    public enum AdvancedSettings
  • The options for H.264 video codec license from Cisco Systems, Inc

    Since

    2.6.0
    See more

    Declaration

    Swift

    public enum H264LicenseAction
  • Modes supported by Background Noise Removal

    Since

    2.7.0
    See more

    Declaration

    Swift

    public enum AudioBNRMode : UInt
  • The enumeration of remote video stream.

    Since

    2.8.0
    See more

    Declaration

    Swift

    public enum VideoStreamMode
  • MARK: - Deprecated The max receiving bandwidth for audio in unit bps for the call. Only effective if set before the start of call. if 0, default value of 64 * 1000 is used.

    Since

    1.3.0

    Declaration

    Swift

    @available(*, deprecated)
    public var audioMaxBandwidth: UInt32 { get set }
  • MARK: - Deprecated The max receiving bandwidth for video in unit bps for the call. Only effective if set before the start of call. if 0, default value of 2000*1000 is used.

    Since

    1.3.0

    Declaration

    Swift

    @available(*, deprecated)
    public var videoMaxBandwidth: UInt32 { get set }
  • MARK: - Deprecated The max receiving bandwidth for screen sharing in unit bps for the call. Only effective if set before the start of call. if 0, default value of 4000*1000 is used.

    Since

    1.3.0

    Declaration

    Swift

    @available(*, deprecated)
    public var screenShareMaxBandwidth: UInt32 { get set }
  • The max receiving bandwidth for audio in unit bps for the call. Only effective if set before the start of call. if 0, default value of 64 * 1000 is used.

    Since

    2.6.0

    Declaration

    Swift

    public var audioMaxRxBandwidth: UInt32
  • The max receiving bandwidth for video in unit bps for the call. Only effective if set before the start of call. if 0, default value of 2000*1000 is used.

    Since

    2.6.0

    Declaration

    Swift

    public var videoMaxRxBandwidth: UInt32
  • The max sending bandwidth for video in unit bps for the call. Only effective if set before the start of call. if 0, default value of 2000*1000 is used.

    Since

    2.6.0

    Declaration

    Swift

    public var videoMaxTxBandwidth: UInt32
  • The max receiving bandwidth for screen sharing in unit bps for the call. Only effective if set before the start of call. if 0, default value of 4000*1000 is used.

    Since

    2.6.0

    Declaration

    Swift

    public var sharingMaxRxBandwidth: UInt32
  • Enable Background Noise Removal True as using BNR, False as not. The default is false.

    Since

    2.7.0

    Declaration

    Swift

    public var audioBNREnabled: Bool
  • Set true to keep Webex server connection when app enters background mode. Default is false.

    Note

    Generally App thread would be suspended when it enters background, enableBackgroundConnection can be effective when your App has handled background mode.

    Since

    2.8.0

    Declaration

    Swift

    public var enableBackgroundConnection: Bool
  • Set Background Noise Removal mode, the default is .HP.

    Note

    The value is only effective if setting audioBNREnabled to true.

    Since

    2.7.0

    Declaration

    Swift

    public var audioBNRMode: AudioBNRMode
  • Set video stream mode, the default is .composited.

    Since

    2.8.0

    Declaration

    Swift

    public var videoStreamMode: VideoStreamMode
  • The advanced setings for call. Only effective if set before the start of call.

    Since

    2.6.0

    Declaration

    Swift

    public var advancedSettings: [AdvancedSettings]
  • The default values of the advanced setings for call.

    Since

    2.6.0

    Declaration

    Swift

    public let defaultAdvancedSettings: [AdvancedSettings]
  • Default camera facing mode of this phone, used as the default when dialing or answering a call. The default mode is the front camera.

    Note

    The setting is not persistent

    Since

    1.2.0

    Declaration

    Swift

    public var defaultFacingMode: Phone.FacingMode
  • Default loud speaker mode of this phone, used as the default when dialing or answering a call. True as using loud speaker, False as not. The default is using loud speaker.

    Note

    The setting is not persistent.

    Since

    1.2.0

    Declaration

    Swift

    public var defaultLoudSpeaker: Bool
  • Callback when call is incoming.

    Since

    1.2.0

    Declaration

    Swift

    public var onIncoming: ((Call) -> Void)?
  • Indicates whether or not the SDK is connected with the Cisco Webex cloud.

    Since

    1.4.0

    Declaration

    Swift

    public private(set) var connected: Bool { get }
  • Indicates whether or not the SDK is registered with the Cisco Webex cloud.

    Since

    1.4.0

    Declaration

    Swift

    public var registered: Bool { get }
  • Registers this phone to Cisco Webex cloud on behalf of the authenticated user. It also creates the websocket and connects to Cisco Webex cloud. Subsequent invocations of this method refresh the registration.

    Since

    1.2.0

    Declaration

    Swift

    public func register(_ completionHandler: @escaping (Error?) -> Void)

    Parameters

    completionHandler

    A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.

    Return Value

    Void

  • Removes this phone from Cisco Webex cloud on behalf of the authenticated user. It also disconnects the websocket from Cisco Webex cloud. Subsequent invocations of this method behave as a no-op.

    Since

    1.2.0

    Declaration

    Swift

    public func deregister(_ completionHandler: @escaping (Error?) -> Void)

    Parameters

    completionHandler

    A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.

    Return Value

    Void

  • Makes a call to an intended recipient on behalf of the authenticated user. It supports the following address formats for the receipient:

    • throw:

    Since

    1.2.0

    Attention

    Currently the SDK only supports one active call at a time. Invoking this function while there is an active call will generate an exception.

    Declaration

    Swift

    public func dial(_ address: String, option: MediaOption, completionHandler: @escaping (Result<Call>) -> Void)

    Parameters

    address

    Intended recipient address in one of the supported formats.

    option

    Intended media options - audio only or audio and video - for the call.

    completionHandler

    A closure to be executed when completed.

    Return Value

    a Call object

  • Cancel the currently outgoing call that has not been connected.

    Since

    2.6.0

    Declaration

    Swift

    public func cancel()
  • Pops up an Alert for the end user to approve the use of H.264 codec license from Cisco Systems, Inc.

    Note

    Invoking this function is optional since the alert will appear automatically during the first video call.

    Since

    1.2.0

    Declaration

    Swift

    public func requestVideoCodecActivation(completionHandler: ((H264LicenseAction) -> Void)? = nil)

    Parameters

    completionHandler

    A closure to be executed when completed.

  • Prevents Cisco Webex iOS SDK from poping up an Alert for the end user to approve the use of H.264 video codec license from Cisco Systems, Inc.

    Attention

    The function is expected to be called only by Cisco internal applications. 3rd-party applications should NOT call this function.

    Since

    1.2.0

    Declaration

    Swift

    public func disableVideoCodecActivation()

    Return Value

    Void

  • Render a preview of the local party before the call is answered.

    Declaration

    Swift

    public func startPreview(view: MediaRenderView)

    Parameters

    view

    an UI view for rendering video.

    Return Value

    Void

  • Stop rendering the preview of the local party.

    Declaration

    Swift

    public func stopPreview()

    Return Value

    Void