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

 

Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.

 

Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.

 

John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.