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

Follow the steps in this guide to begin using Cisco Unified Communications Manager (CUCM, or UCM for short) in your iOS application.

anchorConnect and Verify UCM Phone Services

anchor

Developers who want to utilize UCM features must first log in to UCM and ensure that phone services are connected.

To connect and verify the UCM phone services:

  1. Start UC Services

    webex.startUCServices()
    
  2. Check the UCM login status:

    var isUCLoggedIn = webex.isUCLoggedIn()
    if(isUCLoggedIn) {
        // Successfully logged into the CUCM service.
    }
    
  3. Initiate the login to UCM by setting a domain or server URL:

    Provide either a domain or a server URL, but not both.

    webex.ucLoginDelegate = self // Always ensure ucLoginDelegate is set before invoking the method below.
    webex.setUCDomainServerUrl(ucDomain: "cucm.example.com", serverUrl: "cucmserver.example.com")
    
  4. Implement the WebexUCLoginDelegate interface to handle asynchronous UCM callbacks:

    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() {
            // CUCM login attempt was successful.
        }
    
        func onUCLoginFailed() {
            // CUCM login attempt failed.
        }
        
        func onUCServerConnectionStateChanged(status: UCLoginServerConnectionStatus, failureReason: PhoneServiceRegistrationFailureReason) {
            if status == .Connected {
                // CUCM server connection success.
            }
        }
        
        func loadUCSSOView(to url: String) {
            // If your CUCM server supports SSO-based sign-in, you'll need to open a webview using the webex.getUCSSOLoginView helper as shown below:
            webex.getUCSSOLoginView(parentViewController: self, ssoUrl: url) { success in
                if let success = success, success {
                    // You're logged in                
                }
            }
        }
        
       func onUCSSOLoginFailed(failureReason: UCSSOFailureReason) {
            // If the SSO login fails due to reasons such as session expiry, you'll need to re-login using the webex.retryUCSSOLogin helper as shown below: 
            webex.retryUCSSOLogin()
       }
    
        func showUCNonSSOLoginView() {
            // If your UCM server requires a non-SSO (username/password) flow, this delegate method will be invoked.
            // You should collect the username and password from the user and call the method below: 
            webex.setCUCMCredential(username: "user@example.com", password: "SuperSecret")
        }
    }
    
  5. Check the server connection status:

    let status = webex.getUCServerConnectionStatus()
    if status == .Connected {
        // You're successfully connected to a UCM server.
    }
    

You can now start using UCM phone services.

anchorUse UCM Phone Services

anchor

To use UCM phone services once you've verified your connection:

  1. Make a call.

    Use dialPhoneNumber for PSTN or dial for other call types:

    let mediaOption = MediaOption.audioOnly()
     webex.phone.dialPhoneNumber("+1800123456", option: mediaOption) { result in
        switch result {
           case .success(let call):
                 // Call started successfully.
            case .failure(let error):
                // Call failed.
        }
    }
    

    The dialPhoneNumber API is available starting with version 3.9.2.

  2. Transfer a call:

    guard call.isCUCMCall else { 
        print("Call transfer works only with UCM calls")
        return
    }
    
    // Put an active call on hold
    call.holdCall(putOnHold: true)
    
    // Start a new call that can be transferred later to the previous call
    call.startAssociatedCall( dialNumber: "+1800123123", associationType: .transfer, isAudioCall: true) {[weak self] result in
        switch result {
        case .success(let newCall):
            // Successfully started an associated call that can be transferred
            call.transferCall(toCallId: newCall.callId)
        case .failure(let error):
            // An error occurred
        }
    }  
    
  3. Merge a call:

    guard call.isCUCMCall else { 
        print("Call merge works only with CUCM calls.")
        return
    }
    
    // Put an active call on hold:
    call.holdCall(putOnHold: true)
    
    // Start a new call that can be merged later with the existing call.
    call.startAssociatedCall(dialNumber: "+1800123123", associationType: .merge, isAudioCall: true) {[weak self] result in
        switch result {
        case .success(let newCall):
            // Merge the calls.
            call.mergeCall(targetCallId: newCall.callId)
        case .failure(let error):
            // An error occurred.
        }
    }  
    

anchorFlow Chart for UCM Logins

anchor

UCM login flow chart.

anchorUCM Call Notifications

anchor

For information on handling UCM incoming call notifications, see: App Registration For Mobile SDK v3.

In This Article
  • Connect and Verify UCM Phone Services
  • Use UCM Phone Services
  • Flow Chart for UCM Logins
  • UCM Call Notifications

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.