Phone
public class Phone
The application can obtain a phone object from Webex
object
and use phone to call other Cisco Webex users or PSTN when enabled.
Since
1.2.0-
Declaration
Swift
public enum FacingMode
-
Declaration
Swift
public enum H264LicenseAction
-
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.0Declaration
Swift
public enum AdvancedSettings
-
Declaration
Swift
public enum AudioBNRMode : UInt
-
Declaration
Swift
public enum VideoStreamMode
-
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.0Declaration
Swift
public var audioMaxRxBandwidth: UInt32 { get set }
-
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.0Declaration
Swift
public var videoMaxRxBandwidth: UInt32 { get set }
-
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.0Declaration
Swift
public var videoMaxTxBandwidth: UInt32 { get set }
-
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.0Declaration
Swift
public var sharingMaxRxBandwidth: UInt32 { get set }
-
Enable Background Noise Removal True as using BNR, False as not. The default is false.
Since
2.7.0Declaration
Swift
public var audioBNREnabled: Bool { get set }
-
Set Background Noise Removal mode, the default is
.HP
.Note
The value is only effective if settingaudioBNREnabled
to true.Since
2.7.0Declaration
Swift
public var audioBNRMode: AudioBNRMode { get set }
-
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.0Declaration
Swift
public var enableBackgroundConnection: Bool
-
The advanced setings for call. Only effective if set before the start of call.
Since
2.6.0Declaration
Swift
public var advancedSettings: [AdvancedSettings]
-
Set video stream mode, the default is
.composited
.Since
2.8.0Declaration
Swift
public var videoStreamMode: VideoStreamMode
-
The default values of the advanced setings for call.
Since
2.6.0Declaration
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 persistentSince
1.2.0Declaration
Swift
public var defaultFacingMode: FacingMode { get set }
-
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.0Declaration
Swift
public var defaultLoudSpeaker: Bool
-
Callback when call is incoming.
Since
1.2.0Declaration
Swift
public var onIncoming: ((_ call: Call) -> Void)? { get set }
-
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.0Declaration
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.
Since
1.2.0Declaration
Swift
public func disableVideoCodecActivation()
Return Value
Void
-
Indicates the status of H264 license prompt acceptance.
Since
3.10.0Declaration
Swift
public func isH264LicenseActivated() -> Bool
Return Value
Bool
-
Declaration
Swift
public struct Captcha
-
Makes a call to an intended recipient on behalf of the authenticated user
Note
ReturnsCannotStartInstantMeeting
error if room-id of a non 1:1 space is passed for dialString.Since
3.0.0Declaration
Swift
public func dial(_ address: String, option: MediaOption, completionHandler: @escaping (Result<Call>) -> Void)
Parameters
address
Can be one of Meeting link, space id, meeting number, sip uri, email address and room-ids for 1:1 spaces.
mediaOption
Data type that represents the media options of a Call
Return Value
A uniquely generated call id
-
Dials the given phone number on behalf of the authenticated user
If you use this api to dial anything other than phone numbers, you will get a call failure with invalidApiError
Since
3.9.2Declaration
Swift
public func dialPhoneNumber(_ phoneNumber: String, option: MediaOption, completionHandler: @escaping (Result<Call>) -> Void)
Parameters
phoneNumber
Phone number to dial
mediaOption
Data type that represents the media options of a Call
Return Value
A uniquely generated call id
-
Cancel the currently outgoing call that has not been connected.
Since
2.6.0Declaration
Swift
public func cancel()
-
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
-
This is for setting up the input frame size, required before sending frame
Since
3.0.0Declaration
Swift
public func setupExternalInput(callId: String, height: Int, width: Int)
Parameters
callId
A unique identifier for the call
height
Height of the frame
width
Width of the frame
-
This sends the frame to the media engine
Since
3.0.0Declaration
Swift
public func sendFrameToExternalInputter(callId: String, timeStamp: Int, height: Int, width: Int, data: UnsafeMutableRawPointer, length: Int)
Parameters
callId
A unique identifier for the call
timeStamp
Timestamp of the data frame sent
height
Height of the frame
width
Width of the frame
data
Frame data
length
Length of the data
-
This returns the callId for the corresponding notification id
Since
3.0.0Declaration
Swift
public func getCallIdFromNotificationId(notificationId: String, notificationType: NotificationCallType) -> String
Parameters
notificationId
A unique identifier for the notification
notificationType
The type of notification -
Webex
orCUCM
Return Value
The call id for the incoming call
-
This sets the tokens for the notification
Since
3.8.0Declaration
Swift
public func setPushTokens(bundleId: String, deviceId: String, deviceToken: String, voipToken: String, appId: String? = nil)
Parameters
bundleId
The bundle ID of the application
deviceId
The unique device ID
pushToken
Device token
voipToken
VoIP token
appId
appId
-
This API process the push notification to trigger incoming call callback
Since
3.8.0Declaration
Swift
public func processPushNotification(message: String, completionHandler: @escaping (Error?) -> Void)
Parameters
message
Body of the notification received
-
Declaration
Swift
public enum CallingType
-
Get the enabled calling types for this account
Since
3.8.0Declaration
Swift
public func getCallingType() -> CallingType
Return Value
The type of calling
-
A collection of CallHistoryRecords which contains call history of One to One Spaces, Group type Spaces and UC calls Note: The return type changed from [Space] to [CallHistoryRecord] to accommodate UC calls since 3.6.0
Since
3.0.0Declaration
Swift
public func getCallHistory() -> [CallHistoryRecord]
Return Value
List of CallHistoryRecords
-
Returns the Service URL of a Microservice
Since
3.1.0Declaration
Swift
public func getServiceUrl(serviceUrlType: ServiceUrlType) -> String?
Return Value
service url
-
Declaration
Swift
public enum ServiceUrlType
-
A data type represents the thumbnail of a Virtual Background (empty in case of none and blur).
Since
3.2.0Declaration
Swift
public struct VirtualBackgroundThumbnail
-
Declaration
Swift
public struct VirtualBackground
-
Declaration
Swift
public enum VirtualBackgroundType
-
Declaration
Swift
public enum VirtualBackgroundMode
-
This returns the list of virtual backgrounds
Since
3.2.0Declaration
Swift
public func fetchVirtualBackgrounds(completionHandler: @escaping (_ result: Result<[VirtualBackground]>) -> Void)
Return Value
list of Phone.VirtualBackground
-
This returns if virtual background is supported
Since
3.2.0Declaration
Swift
public var isVirtualBackgroundSupported: Bool { get }
Return Value
true if virtual background is supported else false
-
To add a custom virtual background
Note
SDK will resize uploaded image to 1280x720, if the image size will be greater than 1280x720 to avoid CPU overhead.
Since
3.2.0
Declaration
Swift
public func addVirtualBackground(image: LocalFile, completionHandler: @escaping (_ result: Result<VirtualBackground>) -> Void)
Parameters
image
Local file to be uploaded for virtual background.
Return Value
Phone.VirtualBackground for new added LocalFile
-
To remove a custom virtual background
Since
3.2.0Declaration
Swift
public func removeVirtualBackground(background: VirtualBackground, completionHandler: @escaping (_ result: Result<Bool>) -> Void)
Parameters
background
Phone.VirtualBackground to be removed
Return Value
true if removed successfully else gives the error
-
To set the virtual background
Since
3.2.0Declaration
Swift
public func applyVirtualBackground(background: VirtualBackground, mode: VirtualBackgroundMode, completionHandler: @escaping (_ result: Result<Bool>) -> Void)
Parameters
background
Phone.VirtualBackground to be removed
mode
Phone.VirtualBackgroundMode
Return Value
true if removed successfully else gives the error
-
The limit of number of custom virtual backgrounds, default limit is 3
Note
If background is uploaded after the limit is exhausted, older background will be deleted to make space for new ones. Storage of application will be increased based on the images uploaded for virtual background.
Since
3.2.0
Declaration
Swift
public var virtualBackgroundLimit: Int { get set }
Return Value
Limit of number of custom virtual backgrounds supported
-
Returns true if the device is in restricted network
Since
3.7.0Declaration
Swift
public var isRestrictedNetwork: Bool { get }
-
Callback when restricted network status changes
Since
3.7.0Declaration
Swift
public var onRestrictedNetworkStatusChanged: ((_ status: Bool) -> Void)? { get set }
-
Connect to phone services if the user is already signed in. This only works for CallingType.WebexCalling and CallingType.WebexForBroadworks. The result of the connection status will be notified with WebexUCLoginDelegate.onUCServerConnectionStateChanged().
Since
3.8.0Declaration
Swift
public func connectPhoneServices(completionHandler: @escaping (Result<Void>) -> Void)
-
Disconnect from the server for CallingType.WebexCalling and CallingType.WebexForBroadworks. The result of the connection status will be notified with WebexUCLoginDelegate.onUCServerConnectionStateChanged().
Since
3.8.0Declaration
Swift
public func disconnectPhoneServices(completionHandler: @escaping (Result<Void>) -> Void)
-
To update the system preferred camera
Note
Call.facingMode won’t work with external camera and will switch to default camera if used.
Since
3.12.0
Declaration
Parameters
camera
Camera object to be set as preferred camera
-
To get the list of all available cameras
Since
3.12.0Declaration
Swift
public func getListOfCameras() -> [Camera]
-
Enable this to use legacy receiver side noise removal. This will disable the new receiver side speech enhancement. Disable this to use new receiver side speech enhancement. This will disable the legacy receiver side noise removal. By default useLegacy is
false
. This setting is not persisted.Since
3.14.0Declaration
Swift
public func useLegacyReceiverNoiseRemoval(useLegacy: Bool)
-
Returns
true
if Speech Enhancement is enabled by default for all calls else returnsfalse
.Since
3.14.0Declaration
Swift
public private(set) var isReceiverSpeechEnhancementEnabled: Bool { get set }
-
Enable/Disable Speech Enhancement by default for all calls. Applicable for WebexCalling and CUCM calling
Since
3.14.0Declaration
Swift
public func enableReceiverSpeechEnhancement(shouldEnable: Bool, completionHandler: @escaping (Result<Void>) -> Void)