Home > Uncategorized > Lync Music on Hold for Aries and other phones

Lync Music on Hold for Aries and other phones

Music On Hold for Lync is provided by a client side policy (CsClientPolicy) and is enabled by setting the EnableClientMusicOnHold value to True, this is by default set to False for the Global Policy. To change this you can run the following PowerShell command:

Set-CsClientPolicy Global –EnableClientMusicOnHold:$true

This is a great feature for those that use the Lync client, but unfortunately this does not provide MoH for Aries phones (Polycom CX600, Aastra 6725iP). Fortunately we can supplement the capabilities of the Lync with that of gateway vendors. In our situation, we were already using AudioCodes M1000 MSBGs as the Session Border Controller (SBC). We noticed the gateways had a configuration under Protocol Configuration – SIP Advanced Paramaters — Supplementary Services called “Enable Hold to ISDN” which meant we knew it would play at least a tone to users that called in via POTS or T1/E1 lines, but we wanted this to also be enforced for IP2IP calls as the calls would originate from a SIP trunk.

After some digging and a couple emails around we identified a parameter that needs to be added to the INI file called “PlayHeldToneForIP2IP”. When set to 1 this enabled that same tone to be played when a user was placed on hold over the SIP trunk. To be a little more technical, when the party that initiates the hold a SIP re-INVITE is sent to the gateway with a=inactive in the SDP. When the gateway detects this it injects the audio stream. This file can be replaced with a pre-recorded voice prompt once converted to a Prerecorded Tone (PRT) file. This can be accomplished with the TrunkPack Downloadable Conversion Utility (DConvert) – https://us-support.audiocodes.com/ftp/release/AudioCodes/Utilities/DConvert.zip

This proved to be the hardest part for us as the WAV file we had was not sampled correctly (only 8000kz/mono/8bit or 16000kz/mono/16bit Linear PCM files are supported). I used Audacity (http://audacity.sourceforge.net/download/) Once we got the sampling correct, the rest was pretty easy:

We launched the Dconvert.exe program

Select “Process Prerecorded Tone file(s).

Select Add File(s)… Locate the file you want to convert.

Once you have the file in the list, double click it to bring up the File Data dialog box. Set the fields as follows:

Type: acOnHoldTone

Coder: G711Alaw_64 or G711ulaw – Do not use LinearPCM

Close the File Data Box and select Make File(s).

Once you have the output file in DAT format, simply upload the DAT file to the gateway using the Web interface.

Navigate to Maintenance – Load Ancillary files

Under Prerecorded Tones select the file and upload. Note at the top of the window (not the popup) if the upload was successful or not.


Once the file has been uploaded and the AudioCodes rebooted, you should begin to experience Music On Hold on any device provided by the gateway!

Categories: Uncategorized
  1. mike
    March 2, 2012 at 8:39 pm

    whats the max file size for this?

    i keep getting this error

    WARNING : File close error: File acOnHoldTone.dat – Illegal declared size [Code:40525] [CID:0]
    WARNING : File write error: Allocation failed for acOnHoldTone.dat file data buffer [Code:40600] [CID:0]
    WARNING : No data buffer available for file acOnHoldTone.dat [Code:40600] [CID:0]

    • March 9, 2012 at 2:14 pm

      Mike – thanks for reading. My understanding is the size limit is based on the size of the flash. Most likely the issue is that there is already a file that exists on flash with the same filename that you will first need to remove.

  2. July 12, 2012 at 3:35 am

    Great post. Not sure exactly what problems you had getting this to work, and maybe it is just because I don’t have the sampling right, but when I try and upload my prerecordedtones.dat file to the AudioCodes Mediant it says “File Loading Failed”. Could this be to do with the way the audio file is sampled? DConvert states the file info as “8000Hz, 8000 bytes per second, mono, Alaw, 8 bits per sample, 8 bit mono, 262 seconds”.

  1. December 4, 2011 at 12:49 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: