.. _moh-file-management:

CUCM Music on Hold
----------------------------------------------------

.. _20.1.1|VOSS-712:
.. _21.2|EKB-9644:
.. _21.2|EKB-11261:
.. _25.4|EKB-28101:


.. tip:: 

   :ref:`use-action-search-to-navigate-automate`


Overview
..........

VOSS enables an administrator to manage Cisco UCM (CUCM) Music On Hold (MOH) servers and files 
from within the Admin Portal, and to upload MOH files to Cisco UCM. 

.. note:: 

   Uploading large Music on Hold (MOH) audio files to Cisco UCM may take several minutes, as 
   UCM processes and converts the file before confirming a successful upload. VOSS uses a 
   Selenium-based browser interaction with a default HTTP timeout of 600 seconds (10 minutes) for these 
   uploads, which typically allows large MOH files to complete successfully.


.. uml::
 
   @startuml
   'Cisco UCM Music on Hold file management flowchart
   !include style.iuml

   start
   while (UCM MOH cluster set up? ) is (No)
    :[[../src/user/concepts-music-on-hold-file-management.html#add-a-cucm-moh-cluster Add UCM MOH clusters]];
   endwhile (Yes)
   :[[../src/user/concepts-music-on-hold-file-management.html#upload-a-single-moh-file Upload a file to MOH cluster]];
   if (Upload multiple files added in VOSSs to MOH clusters?) then (Yes)
    :[[../src/user/concepts-music-on-hold-file-management.html#upload-multiple-moh-files Upload multiple files to MOH clusters]];
   else (No)
   endif
   :[[../src/user/concepts-music-on-hold-file-management.html#add-a-moh-audio-source Add MOH audio sources]];
   if (Select MOH sources?) then (Yes)
    fork
     :[[../src/user/configure-lines.html#configure-lines Lines - Advanced Info - MOH Source]];
    fork again
     :[[../src/user/hunt-groups.html Hunt Groups - Queueing - MOH Source]];
    end fork
   else (No)
   endif
   end
   @enduml



Managing MOH files involves: 
 
1. Adding a UCM MOH cluster for uploading MOH files.   
2. Uploading MOH ``.wav`` files to VOSS, and (optionally) to the Cisco UCM MOH cluster. VOSS 
   syncs the file to UCM once it's added to the UCM MOH cluster.
3. Adding MOH audio sources for use in VOSS (for example, to manage lines and hunt groups).

.. note::

   Deleting a ``.wav`` file from Automate does not remove the file from UCM MOH clusters.


A MOH file you're adding is uploaded to the VOSS database, and if you selected a MOH cluster, the file is also added 
to the MOH cluster (to the publisher, and to any Cisco Subscriber servers flagged as music servers). 
A data sync is triggered to add the 
files to UCM, and any MOH files on UCM are imported to VOSS in the sync. These MOH files are available for 
selection when adding or managing MOH audio source files.




.. rubric:: CUCM, MOH files, NDLs, and upgrading VOSS

When uploading MOH files at site level, the CUCM MOH cluster is automatically selected based 
on the site Network Device List (NDL).

Since data syncs export and import MOH files between VOSS and Cisco UCM, when upgrading from a 
previous version of VOSS, a workflow creates a new data sync entry for each of the existing call managers, 
and adds the call managers to the correct NDLs.

To view data sync entries, go to the **Data Sync** page. Data sync entries 
are prefixed with the name of the API (``CMCCS`` - Call Manager Control Center Services)


.. rubric:: Related topics 

* :ref:`data-sync`
* :ref:`file-management`






Add a CUCM MOH cluster
..........................

This procedure adds a Cisco UCM MOH cluster. 

.. note:: 

   MOH files are uploaded to the Cisco UCM MOH cluster.  

1. Log in to the Admin Portal. 
#. Go to **Manage MOH Clusters**. 
#. On the **Manage MOH Clusters** list view, click **Add** to open **Manage MOH Clusters/New Record**. 
#. Fill out details for the new MOH cluster: 

   =================================== ==========================================================================================================
   Cluster Name                        Add a name for the UCM MOH cluster. You can use the same name as the UCM cluster, or a unique name.
  
   Publisher Server Name               Choose a UCM publisher server from the list of available UCM publisher servers at the hierarchy.  

   Publisher Hostname or IP Address    This field is auto-populated once you choose a 
                                       publisher server name. The value must match the SERVICE_PROVIDER_SPACE hostname or IPv4 address of 
                                       the UCM publisher server.

                                       .. note:: 

                                          By default, the port used to connect to the publisher is `443`.

   Publisher username                  Specify the username of a user with administrative access to the UCM server GUI.

   Publisher Password                  Specify the password of the publisher username. 

   UCM Subscriber Details              Click the Plus icon (+) to add UCM subscriber servers (one or more), and specify details for each 
                                       subscriber server you're adding. These UCM subscriber servers are part of the UCM cluster. For 
                                       each server you add, you will need to provide the following details:  

                                       * Subscriber server name
                                       * Hostname or IP address
                                       * Username (and an associated password for this user)
                                       * Is Music Server - defines whether the subscriber server you're adding is a MOH server. MOH files are 
                                         uploaded to a server with this setting enabled. At a minimum, you should add at least the subscriber 
                                         with a MOH role (music servers).

                                         .. note:: 

                                            The port used to connect to a subscriber server `443`. 
   =================================== ==========================================================================================================
                                                     
#. Save your changes to add the UCM MOH cluster.                                                                    



View MOH Files 
................

This procedure displays the list of files that exist on the Call Manager Publisher. 

.. note:: 
   
   * Files uploaded to MOH clusters in VOSS are imported to the database. An automatic sync 
     is created for each of the CUCM (Call Manager Control Center Services MOH File model sync, or CMCCS sync) so 
     that you can run a manual data sync to update the list of files on this page. 

     If you're upgrading to v21.2, you can immediately execute this data sync to import the files; else, 
     they will be automatically imported automatically the next time you upload a new file to the CUCM. 

   * The menu for the MOH list view functionality is added to the default menus and access profiles for the following 
     admin roles: Provider, Reseller, Customer



**To view the list of MOH files**: 

1. Log in to the Admin Portal as a Provider, Customer, or Reseller admin. 
2. Go to **List MOH Audio Files**.
3. In the list view, you can: 

   * View the list of MOH files. 

    .. note:: 

       WAV files are stored in the database as XML files. 

   * Export files (select the files you wish to export, and click the **Export** icon)




Upload a single MOH file
.........................

This procedure uploads a ``.wav`` MOH file to the VOSS database, and optionally also to a CUCM MOH cluster.  

.. note:: 
  
   You can upload the MOH file to the relevant CUCM at the same time as you add it to 
   VOSS, or after you've added the file to VOSS. When files are uploaded to a CUCM MOH cluster, files are 
   uploaded to the publisher server as well as to CUCM Subscriber servers that have the 
   **Is Music Server** setting enabled. 


**To upload a MOH file**:

1. Log in to the Admin Portal.
#. Go to **Manage Files and Upload to MOH Cluster**. 
#. In the list view, click the Plus icon (+) to open the **Manage Files And Upload to MOH Cluster / New Record** page.
#. Click **Choose File** to locate the ``.wav`` file from your filesystem. 

   .. note:: 
     
      * Once you've chosen the file, the name of the file displays in the **Filename** field.  
      * If a file with same name as an existing file is uploaded at the same hierarchy, the existing file 
        is automatically deleted. 

#. (Optional). Add a description for the file. 

#. (Optional). From **CUCM MOH Cluster**, choose the relevant CUCM MOH cluster.
   
   .. note:: 

      * If you don't choose a CUCM MOH cluster, the file is uploaded only to the VOSS database. 
      * In the list view, when viewing a MOH file that has already been uploaded to a MOH cluster, you 
        can select the MOH cluster to re-add the file to the cluster. MOH files you add to a MOH cluster 
        here will display in CUCM. 
      * A ``.wav`` file that has previously been uploaded to VOSS can be re-uploaded to the same 
        CUCM MOH cluster, or to another CUCM MOH cluster.
      * Deleting a ``.wav`` file from VOSS does not remove the file from the CUCM MOH clusters.
      * Uploading files to the pre-release version of CUCM 12.5.1 SU1(12.5.1.11900-20) will fail.

#. Save your changes. 





Upload Multiple MOH Files
............................

This procedure uploads two or more MOH files to CUCM MOH clusters. 

1. Log in to the Admin Portal. 
#. Go to **Upload Multiple Files to MOH Clusters**, then:  

   * At **CUCM MOH Clusters**, choose the MOH cluster where you want to upload MOH files: 
   
     * Move the MOH clusters you wish to use, from **Available** to **Selected**.
     * Move MOH clusters you don't want to use, from **Selected** to **Available**.

   * At **MOH File Names**, choose the MOH files you wish to upload: 

     * Move the MOH files you wish to upload, from **Available** to **Selected**.
     * Move the MOH files you don't want to upload, from **Selected** to **Available**. 

   .. note:: 

      Use the right and left arrows to move your choices to the relevant sides of the transfer boxes. Use the 
      up and down arrows to re-position items in the transfer boxes.  

#. Save your changes. 




Add a MOH Audio Source
........................

This procedure adds a MOH audio source instance, once MOH files have been added to CUCM. 

.. note:: 
  
   A MOH audio source instance is required in order to make use of the MOH files that 
   have been uploaded to CUCM MOH clusters.  



**To add a MOH audio source**:


1. Log in to the Admin Portal. 
#. Go to **Add MOH Audio Source**. 
#. At **CUCM MOH Cluster**, choose a CUCM MOH cluster where the audio source will be added.  
#. At **MOH Audio Source Name**, provide a unique, descriptive name for the MOH audio source.

   .. note:: 

      The MOH audio source name and the MOH audio file may be modified once you're created the 
      MOH audio source.

#. At **MOH Audio Stream Number**, choose an available audio stream number. 

   .. note:: 

      * The drop-down displays only available stream numbers. The number ``1`` is reserved in CUCM, so only 
        numbers from ``002`` display as available in VOSS.

      * The following stream number is reserved for a fixed MOH audio source, and is not shown: ``051``

#. At **MOH Audio Source File**, choose the MOH file previously uploaded to the CUCM MOH cluster. 
#. Save your changes. 

   Once you've added the first MOH audio source, VOSS triggers a sync from CUCM to fetch all 
   MOH audio sources. When you add a new MOH audio source, the workflow sync adds the new file to 
   CUCM. 
   
   MOH audio source files you add in VOSS may be viewed, updated, or deleted via **Manage MOH Audio Source**.





Manage MOH Audio Sources
.........................

This procedure allows you to view and manage existing MOH audio sources. 

.. note:: 
  
   MOH audio sources you've added to the system are used for:

   * Managing lines for users. See Directory Number Advanced Information in :ref:`configure-lines`
   * Managing hunt groups for users. See Queuing in :ref:`add-hunt-group`


.. rubric:: View and Manage MOH Audio Sources 


1. Log in to the Admin Portal. 
#. Go to **Manage MOH Audio Source**. 
#. View existing MOH audio sources in the **Manage MOH Audio Source** list view, and choose an action: 

   * To delete a MOH audio source (one or more), select the checkbox for the relevant entries, and click the **Delete** icon. 
   * To filter the list, click the toolbar **Filter** icon, or enter filter criteria in the column headers. 
   * To move MOH audio sources (one or more), select the relevant checkboxes, and click the **Move** icon. 
   * To view or update a MOH audio source, click on the relevant entry in the list to open its configuration screen. Go to 
     step 4.

#. On the MOH audio source configuration page, view existing settings, and update relevant fields, as required:  

   ===================================================== =====================================================================================
   **MOH Audio Stream Number**                           Read-only. The default, reserved number in CUCM is `1`.  
   **MOH Audio Source Name**                             Editable. The name of the MOH audio source. 
   **MOH Audio Source File**                             WAV files uploaded and saved to the database as XML files. You can choose another 
                                                         file. The drop-down displays files on CUCM.  
   **Initial Announcement**                              Choose an available initial announcement.                  
   **Play Initial Announcement to Hunt Pilot callers**   Define whether to play an initial announcement. Clear the checkbox to disable this 
                                                         setting if an agent is available. 
   **Periodic Announcement**                             Choose an available announcement from the drop-down. 
   **Periodic Announcement interval**                    Enter a value, in seconds (10s - 300s). The default is 30s. 
   **Locale Announcement**                               Choose a locale. 
   ===================================================== =====================================================================================

#. Save your changes. Updates are added to CUCM. 






