CreateBlogSupport
Log inSign up
Home
Webex Calling
  • Guides
  • Webex Calling Beta
  • Webex Cloud Calling
  • Broadworks Calling
  • UCM Calling
  • AI Assistant for Developers
  • Beta Program
  • Webex Status API

Webex Calling

Basic Usage

This article outlines the fundamental steps for integrating call functionality using the Webex iOS SDK.

anchorRegister for Callbacks

anchor

To initiate and receive calls, the phone services must be operational. After signing into Webex, authentication for Webex calling phone services occurs automatically via Single Sign-On (SSO). An application can register the WebexUCLoginDelegate to determine when the phone services are ready. The onUCServerConnectionStateChanged callback indicates the connection status of the phone services, showing UCLoginServerConnectionStatus.Connected when available for use:

class YourViewController: UIViewController {
    override func viewDidAppear(_ animated: Bool) {
        // You need to register your class as a delegate.
        webex.ucLoginDelegate = self
    }
}

extension HomeViewController: WebexUCLoginDelegate {
    func onUCLoggedIn() {
        // Login is successful.
    }
    
    func onUCLoginFailed() {
        // Login attempt failed.
    }
    
    func onUCServerConnectionStateChanged(status: UCLoginServerConnectionStatus, failureReason: PhoneServiceRegistrationFailureReason) {
        if status == .Connected {
            // Server connection success.
        }
    }
    
    func showUCSSOLoginView(to url: String) {
        webex.getUCSSOLoginView(parentViewController: self, ssoUrl: url) { success in
            if let success = success, success {
                // You're logged in.
            }
        }
    }
    
    func showUCNonSSOLoginView() {
        webex.setCallServiceCredential(username: "user@example.com", password: "SuperSecret")
    }
}

anchorQuery Phone Services Status

anchor

To check the current status of phone services, use the webex.getUCServerConnectionStatus() method:

let phoneServicesStatus = webex.getUCServerConnectionStatus()
if (phoneServicesStatus == UCLoginServerConnectionStatus.Connected) {
    // Indicates that phone services are ready.
}

anchorPlace an Outgoing Call

anchor

When phone services are active, you can make outgoing calls to any Webex calling or PSTN number using webex.phone.dialPhoneNumber(). Note that attempting to dial non-phone numbers with webex.phone.dialPhoneNumber() will lead to a call failure, indicated by INVALID_API_ERROR:

webex.phone.dialPhoneNumber("+1800123456", option: MediaOption.audioOnly()) { result in
    switch result {
    case .success(let call):
        call.onConnected = {
            // Do something once the call is connected.
        }
        call.onDisconnected = { reason in
            // Do something on call disconnect.
        }
    case .failure(let error):
        // Call failure.
    } 
}

The dialPhoneNumber method is available from version 3.9.2 and later.

anchorMute or Unmute a Call

anchor

Mute a call:

call?.sendingAudio = false 

Unmute a call:

call?.sendingAudio = true 

anchorHold or Resume a Call

anchor

Hold a call:

call.holdCall(putOnHold: true)

Resume a call:

call.holdCall(putOnHold: false)

Check if a call is on hold:

let isOnHold = call?.isOnHold()

anchorEnd a call

anchor

End a connected call using the call.hangup() method:

call.hangup(completionHandler: { error in
    if error == nil {
        // Call ended successfully.
    }
    else {
        // Failed to end call.
    }
})
In This Article
  • Register for Callbacks
  • Query Phone Services Status
  • Place an Outgoing Call
  • Mute or Unmute a Call
  • Hold or Resume a Call
  • End a call

Connect

Support

Developer Community

Developer Events

Contact Sales

Handy Links

Webex Ambassadors

Webex App Hub

Resources

Open Source Bot Starter Kits

Download Webex

DevNet Learning Labs

Terms of Service

Privacy Policy

Cookie Policy

Trademarks

© 2025 Cisco and/or its affiliates. All rights reserved.