UC Toolkit: Using Audacity for CUCM Ring Tones

Author
William Bell
Vice President, Solutions and Products

Background

Audacity is a free audio editor and recorder that has been around since 2000. It runs on Windows, Mac OS X, and GNU/Linux platforms. Audacity has a pretty robust set of features for a free application. You can see a list of features here. The latest release is available on sourceforge (Audacity Download). I currently use Audacity 1.3 beta on Mac OS X. I also have Audacity 1.2.6 on my Windows VM. The 1.3 beta has crashed on me once or twice but the interface has a number of enhancements that definitely make it worthwhile.

Using Audacity to read Ring Tone Files

You can use Audacity to import ring tone files from CUCM. You need to download the ring tone file to your desktop (you can use a TFTP client to get the file). Once down loaded you can go to File>Import>Raw Data (Audacity 1.3 beta on Mac OS X) or Project>Import Raw Data (Audacity 1.2.6 on Windows).

When importing a file, you have to specify the parameters that Audacity should use to read the file. Using the following should get it done:

  • Encoding: U-Law
  • Byte order: Big-endian
  • Channels: 1 Channel (Mono)
  • Start offset: 0
  • Amount to import: 100%
  • Sample rate: 8000 Hz

You can now work with the file and edit as needed. Just keep in mind that the final product needs to use the parameters above and should also have no fewer than 240 samples, no more than 16,080 samples, and the number of samples should be divisible by 240. Audacity is nice enough to show you the number of samples. In the 1.3 beta version you have a tool bar at the bottom of the screen where you can set the selection format from hh:mm:ss to “samples”. See below:

In the Windows version (1.2.6) you can set the selection format by going to View>Set Selection Format>Samples.

Using Audacity to Create Ring Tone Files

To use Audacity to create a ring tone file you first need to find a source file. You can download this from where ever you want. Be mindful of copyright infringement! We’ll use an example for the show 24. I have a mp3 of the ring tone used on the CTU desk phones.

Step 1: Create a new Project and Open the source file.

Step 2: Select the audio segment you want by clicking at the start point in the waveform and dragging the mouse to the right until you reach the end of the sample you want.

Step 3: Check the number of samples.  You can see in the figure about that the total number of samples is 23,040. That is more than what we are allowed to use (remember 16,080 is the max number of samples). However, this is not an issue. The mp3 file I am using is using a 16,000 Hz sampling rate. By toggling the “Project rate” from 16000 to 8000 we get a more accurate number for our calculation. Looking at the figure below, we now have 11,520 samples. We now use our ol’ calculator to ensure the number of samples is evenly divisible by 240. (Hint: In the 1.3 beta version on the Mac you can edit start and end positions).

Step 4: We now want to do the conversion. This is done as an export function. On the Mac version you go to File>Export Selection. In the Format drop down we select “Other uncompressed files” and then choose the Options… command. We set the Header to “RAW (header-less)” and the Encoding to “U-Law”.


We then name the file and save it to the appropriate folder.

In the 1.2.6 version I have on Windows, you have to take an extra step before exporting. You have to go to Edit>Preferences. On the “File Formats” tab, you need to set the “Uncompressed Export Format” to “Other…” and then set the appropriate Header and Encoding options. THEN you can can go to File>Export as RAW. Step 5: When saving the file you are typically given a dialog to edit the metadata associated with the file. Don’t enter any metadata and if you see metadata values, click on the Clear button. Now, you can click OK.

Considerations for Source Files in Stereo Format

 I guess I should touch on the fact that the RAW file used for ringtones must be in mono format, not stereo. If you have a source file that is in stereo then it will be obvious in the wave form (there will be two). If that doesn’t clue you in then you will see the key word “Stereo” in the description block (left of the wave form). To convert the audio source from stereo to mono, do the following:
Step 1a: Select the drop down box in the description block and choose the option “Split Stereo to Mono”.

Step 1b: You will now have two separate channels. Delete one of them. (Doesn’t matter which one, they were in stereo).
Now you can carry on with Step 2 (above).

A Blurb on Uploading Ring Tones to CUCM

I guess it is appropriate to provide some guidance on uploading ring tones to CUCM. I think that Cisco covers this topic pretty well in the CUCM Features and Services Guide. This guide is available in different versions but the process hasn’t changed (much anyway) for a long time (I think I used the same basic process for CM 3.2).


William Bell is the Collaboration Practice Lead for Chesapeake NetCraftsmen. Bill has over 10 years of experience in the IT industry with a focus on communication and collaboration technologies. In addition to blogging on the NetCraftsmen site, Bill also maintains the UC Guerrilla blog: http://ucguerrilla.com. You can follow Bill on Twitter: @ucguerrilla

Leave a Reply