.. _moh-file-management:

Music on Hold (MOH) File Management
-----------------------------------

.. _20.1.1|VOSS-712:

The VOSS-4-UC MOH File Management feature allows administrators to carry out a
number of tasks within the Admin Portal to manage MOH servers and files, including
the upload of MOH files to Unified CM.

MOH file management in VOSS-4-UC consists of a number of steps:
 
* Manage CUCM MOH Clusters.
* Upload MOH ``.wav`` files to VOSS-4-UC.
* Upload MOH ``.wav`` files to CUCM MOH clusters.

* Add and manage MOH Audio Sources for use
  in VOSS-4-UC (for example line and hunt group management).

.. note::

   If a ``.wav`` file is deleted from VOSS-4-UC, it is not removed from CUCM MOH clusters.

.. uml::
 
   @startuml
   !include style.iuml

   start
   while (CUCM MOH Cluster set up? ) is (No)
    :[[../src/user/concepts-music-on-hold-file-management.html#cucm-moh-clusters CUCM MOH Clusters]];
   endwhile (Yes)
   :[[../src/user/concepts-music-on-hold-file-management.html#manage-files-and-upload-to-moh-cluster Add, manage files and upload to MOH cluster]];
   if (Upload multiple files added in VOSS-4-UC to MOH Clusters?) then (Yes)
    :[[../src/user/concepts-music-on-hold-file-management.html#upload-multiple-files-to-moh-clusters Upload multiple files to MOH clusters]];
   else (No)
   endif
   :[[../src/user/concepts-music-on-hold-file-management.html#moh-audio-sources 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/tasks-add-hunt-group.html#add-hunt-group Hunt Groups - Queueing - MOH Source]];
    end fork
   else (No)
   endif
   end
   @enduml


CUCM MOH Clusters
..................

Unified CM clusters can be managed from the
**Manage MOH Clusters** menu.

1. Click **Add** to start the task.

2. MOH Cluster details:
   
   * **Cluster Name**: add a name for the CUCM MOH cluster, this can be the same as the Unified CM Cluster name or a unique name.
   * **Publisher Server Name**: the drop-down shows a list of Unified CM publisher servers added at the hierarchy, select the required one.
   * **Publisher Hostname or IP Address**: populated based on the Server Name chosen, this must match the SERVICE_PROVIDER_SPACE hostname or IPv4 address of the CUCM publisher server.

     ..  note::

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

   * **Publisher Username**: username of a user which has administrative access to the Unified CM server GUI.
   * **Publisher Password**: password of the user.
   * **Subscriber Details**: add the details of the subscriber servers which are part of the Unified CM cluster.
    
     * Enable **Is Music Server** if the subscriber performs the role of Music on Hold. MOH Files are only uploaded to the subscriber servers which have **Is Music Server** enabled.

     ..  note::

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


3. Click **Save** to carry out the task.

Add, Manage Files and Upload to MOH Cluster
..............................................

This functionality allows an administrator to add MOH files to VOSS-4-UC by uploading them.
Optionally, the MOH file can also be uploaded to an applicable CUCM at the same time as
adding it to VOSS-4-UC or after the file is already in VOSS-4-UC.

From the **Manage Files and Upload to MOH Cluster** menu, MOH ``.wav`` files
can be:

* Uploaded to VOSS-4-UC.
* Uploaded to a CUCM MOH Cluster: files are uploaded to the publisher server, as well as the subscriber servers which have 
  the **Is Music Server** check box enabled.

1. Click **Add** to start the task.
   
2. Click **Browse** to select the ``.wav`` file from your file system to show in
   the **Filename** input box and to upload it.
   
   An optional **Description** can be added to the uploaded filename.
   
   Select the **CUCM MOH Cluster**.
   If a **CUCM MOH Cluster** is *not* selected, then the file is only uploaded to VOSS-4-UC.
   
   .. note::
     
      * When uploading files at site level the CUCM MOH Cluster is automatically selected based on the site Network Device List (NDL).
      * Uploading files to the pre-release version of CUCM 12.5.1 SU1(12.5.1.11900-20) will fail.
   
   
3. Click **Save** to complete the task.


Notes on management tasks:

* If a file with same name as an existing file is uploaded at the same hierarchy,
  then the existing file will be deleted automatically.
* A ``.wav`` file that has been uploaded to VOSS-4-UC previously can be re-uploaded to the same CUCM MOH Cluster again or another CUCM MOH cluster.
* If a ``.wav`` file is deleted from VOSS-4-UC, it is not removed from CUCM MOH clusters.


Upload Multiple Files to MOH Clusters (Optional)
..................................................

Two side-by-side transfer boxes are available from the
**Upload Multiple Files to MOH Clusters** menu to add uploaded 
files in VOSS-4-UC to MOH Clusters.

To carry out multiple uploads, select CUCM MOH clusters
and MOH file names from the **Available** transfer boxes.

Click **Save** to complete the task.


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

In order to make use of the MOH files that have been uploaded 
to CUCM MOH clusters, a MOH Audio Source instance needs to be created:

To add a MOH Audio Source:

Choose the **Add MOH Audio Source** menu:

* **CUCM MOH Cluster**: the CUCM MOH Cluster where the Audio Source will be added to.
* **MOH Audio Source Name**: a descriptive, *unique*  name for the MOH Audio Source.
* **MOH Audio Stream Number**: select an available audio stream number.
* **MOH Audio Stream File**: select a MOH File which has been uploaded to the chosen MOH CUCM Cluster.
 
  Note that:

  * stream numbers in use will not show
  * 051 is reserved for a fixed MOH audio source and is not shown
* **MOH Audio Source File**: the file previously uploaded to the CUCM MOH cluster.

To manage MOH Audio Sources:

Additional details for a selected Audio Source can be managed.
Choose the **Manage MOH Audio Source** menu:

* **MOH Audio Stream Number**: read-only
* **MOH Audio Source Name**: read-only
* **MOH Audio Source File**: read-only

Announcement Settings are available for management: 

* **Initial Announcement**: choose an available Announcement from drop-down
* **Play Initial Announcement to Hunt Pilot callers**: check-box enabled by default. Clear to disable when an agent is available.
* **Periodic Announcement**: choose an available Announcement from drop-down
* **Periodic Announcement interval**: Enter a value in seconds (10s-300s). Default is 30s.
* **Locale Announcement**: choose an available Locale from drop-down

The added MOH Audio Sources are available to:

* Manage for **Lines** as MOH Audio Source
  as a part of **Subscriber Management** - see 
  Directory Number Advanced Information, MOH Source at :ref:`configure-lines`.
* Manage for **Hunt Groups** as **Queuing** MOH Audio Source
  as a part of **Subscriber Management** - see
  :ref:`add_hunt_group`.