Howto13r2:Step-by-Step Custom Music on Hold(MoH)

From innovaphone wiki
Jump to navigation Jump to search

When a call is put on hold, you can play custom music for the person waiting.

Overview Custom Music on Hold.png

Purpose

The article will describe how to configure a custom MoH using the Files App.

Features

  • A custom Music on Hold is played when a call is put on hold.

Limitations

  • This solution plays a static file to a user on hold. You can play a dynamic MOH using an external PHP-server or object-specific (e.g. based on number or node) files using a URL-Parameter (search for URL %<id> in the PBX/General Reference page).

Requirements

  • innovaphone PBX & App Plattform with Files App
  • Audio file in wav, mp3, flac or ogg format

Things to know before you begin

  • You cannot use an .mp3 or .wav as it is. You have to convert it to a format that can be played by the phone.
  • It is recommended to provide the announcement in as many codecs as possible since different codecs can be negotiated by different endpoints.

Configuration

In our scenario, we have the following initial situation:

  • A custom MoH music should be used for all PBX users

Convert audio files

You have to convert the already recorded audio files into formats that can be played by the phone. You already learned how to do this in our IT Connect training. You can use the audio converter on our website to do this: our website.

Provide audio files via Webdav

To make your audio files available to the PBX, unzip the folder you downloaded, upload it to your files app (drag & drop) and share the folder with a fileskey as we learned in the IT Connect training.

The steps are the following:

  • in the Files App, click on the add folder symbol on the upper right
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-create folder.png


  • rename the new folder to music-on-hold
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-rename folder.png


  • click on the Mark button on the upper right and make sure only the new music-on-hold folder is ticked
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-select folder.png


  • click on the right arrow button on the right
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-share folder.png


  • select share as link with filekey and leave all other fileds empty. The click on Share
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-share2 folder.png


  • open the new folder by clicking on the folder name music-on-hold
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-open folder.png


  • copy all files (custom-moh.g711a, custom-moh.g711u, custom-moh.g722, custom-moh.g723, custom-moh.g729, custom-moh.opus-nb, custom-moh.opus-wb) to the music-on-hold using drag-and-drop from the Windows-Explorer to the Files App
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-copy files.png


  • finally click on the little i symbol on the upper right. Take note of the link shown (you may want to copy it to a text file)
Howto13r2-Step-by-Step Custom Music on Hold(MoH)-Share files in FilesApp via Fileskey-share link.png


You will need the fileskey=h801WTpWZYKT6Pzb option later on as it allows access to the shared files in you music-on-hold.

PBX settings

The next configuration step has to be done on the Advanced UI. You need to enter the Music On Hold URL which is a configuration option on PBX/Config/General. This URL must point to the location the file is located.

Step-by-Step Custom Music on Hold 1.png

This is the entire URL which is not shown as a whole in the picture:

https://apps.dvl-vgr.net/dvl-vgr.net/files/UI/music-on-hold/custom-moh.$coder?coder=g711a,g711u,g722,g723,g729,opus-nb,opus-wb&repeat=true&fileskey=h801WTpWZYKT6Pzb

This is a long URL, so let's break it down

  • https: Since we retrieve the audio files via http, we have to define the protocol at first. This is either http or https.
  • apps.dvl-vgr.net: This is the fully qualified domain name of the AP
  • dvl-vgr.net/files/UI/music-on-hold: This is the path to the files location.
  • custom-moh: This is the files name that should be retrieved
  • .$coder: This is the placeholder for the filename extension, which may be different for each call. If both endpoints (PBX and phone) have decided to use g711a, the filename extension will be .g711a.
  • ?: The question mark separates the file path from the URL parameters.
  • coder=g711a,g711u,g722,g723,g729,opus-nb,opus-wb: The coder URL parameter lists all available coders. Please list only coders for files that exist in the created folder
  • &: The ampersand separates two URL parameters.
  • repeat=true: This URl parameter will play the file in an endless loop, otherwise MoH will stop after the first cycle.
  • fileskey=h801WTpWZYKT6Pzb: To retrieve the MoH file from the Files app, the PBX must authenticate itself. To do this, it needs the filekey as URL parameter.

You need to recreate the Music on Hold URL so that it points to your App Platform, path, file name, codec extensions and your filekey.

Verification

  • Call from a phone to another phone and press R-key to put the remote user on hold.
    • The expected behavior would be that held user hears the custom MoH.

Known issues

  • The Music on Hold URL cannot be longer than 500 characters.

Related Articles