How To Create Custom / Distinctive Ring Tones on Polycom Phones
Purpose and Overview
When creating a custom ring tone, you have simple aspirations: to make your phone cooler than everyone else's. Perhaps you need a louder ringer. Perhaps you want your phone to sound like a model 2500 touch tone phone from the late 70's and early '80s. Maybe, you need to make "Ding dong the witch is dead" the ring tone for that jerk at the office who thinks the IT department is useless. Whatever. Here's how you do it.
Conventions and Assumptions in this article.
In writing this article, I have assumed:
1. You are using a Linux machine (examples are for Ubuntu based systems).
2. You have at least an intermediate knowledge of Linux, bash, and administrator rights on your system.
3. You have an established provisioning server. (Examples here use TFTP, but the concepts are nearly identical for FTP and HTTP servers).
4. You are running Asterisk. The process and concept is the same for other SIP servers, but Asterisk is used in the article for syntax and examples.
1. Working with Sound Source Files
Converting Source Files
First thing you have to understand is that the Polycom phones are very picky about their ring tones. They have to be single channel, 8000hz sampled. So, if you're starting with a wav, mp3, or otherwise, use sox to convert it to the appropriate audio file type and sample rate.
How to Use sox:
Install sox with apt-get install sox
or yum install sox
Once installed, use the syntax below to resample your file into a Polycom appropriate version:
sox sourcesound.wav -c 1 -r 8000 -U ring tone1x.wav [vol x.x]
Once you have a properly formatted sound file, you need to store it on your provisioning server in the directory that is serving your provisioning files.
Understanding how the Polycom "understands" what ringer to use and where it is.
The ringer is triggered by an ALERT-INFO header (See: RFC 3960
). When Asterisk is executing and extension in the dial plan, the SIP-INFO header is sent to the phone just before the dial application begins to setup the call. Upon receiving the ALERT-INFO header, the Polycom parses the Alert-info and extracts the label for the ring tone.
Next, the Polycom compares the label with the contents of the se.rt.x.name
values in the sip configuration file. When it finds the label, it will then reference the type and ringer.
Finally, the Polycom will use the type and ringer information to identify the ring tone as a custom ring tone, and ultimately play the ring tone using the the information found in the values of saf.x
under sip > sampled_audio.
To sum it up, we have to tell the Polycom that there is a chance they will receive an alert info that specifies a ring tone. Give it a "lookup" value of what to do with that information, and finally give it a path where that ring tone can be found.
2. Configuring Your SIP Configuration File.
This section directly corresponds ONLY to SIP v 3.2.1 RevB.
Values and positional locations of these values may change without notice when the SIP application version changes: it just depends on what Polycom decides to do with their software and when they decide to do it. If you're running a different version, double check your configs to make sure everything matches up. As of version 3.2.1 RevB, the location of these values has been greatly simplified in comparison to previous versions.
1. Open sip.cfg
in XML Notepad 2007 or our favorite XML editor. You can also do this by hand, but XML editors make it easier.
2. Expand sip > alertInfo
1. For voIpProt.SIP.alertInfo.1.value
, enter the corresponding value as a label. This label will be the SIP Info header you attach to the dial statement for distinctive ringing. Use a single word for simplicity.
2. For voIpProt.SIP.alertInfo.1.class
enter the ring class. This specifically refers to a ring type number as defined in the next section, sip > sound_effects > ringType > CUSTOM_1 > se.rt.x
. The first available value is 8.
3. Expand sip > sound_effects > ringType > CUSTOM_1
1. For se.rt.8.name
, enter a name that describes the ring.
2. For se.rt.8.type
, confirm ring is there.
3. For se.rt.8.ringer
enter the number for the ringer you want to use (1-12) or enter a sampled ring tones ringer number (13+).
4. If you are using a sampled ring tone
1. Expand sip > sampled_audio
2. Enter your sampled audio starting at saf.2
corresponds to the first available custom ringer on the phone (13). Each ringer thereafter has a difference of 11. saf.3 = 14, saf.4 = 15, and so on. NOTE: this must be in the form of a URL, i.e, tftp://192.168.1.70/ringer.wav
5. Reboot phone for this to take effect.
3. How to Tell Your Configuration Works
Confirming Your SetupIf you have configured everything correctly, you should be able to open the menu, go to preferences, and find the ring tone section. In that section, starting at ring tone #13, you should either see the label you put in to sip.cfg that describes the ringer, or the name of the wav file itself. Pressing play will play the ring tone as a demonstration. If you get a default sound, use the next section to troubleshoot.
4. Configuring Asterisk
Modifying the Dial Plan to Implement the Custom Ring Tone
At an appropriate place (preferably just before a dial statement) insert a SIPAddHeader command:
exten = 4101,1,SIPAddHeader(Alert-
exten = 4101,n,Dial(SIP/4101)
Troubleshooting ring tones
1. Make sure you have encoded the wav file using sox as stated above.
2. Make sure the wav file is available at the path you put in sip.cfg. Use a command line tftp client to download and play it to check for errors.
3. Retrace your steps in this guide to make sure you have dotted your i's and crossed your t's.
4. Make sure that the phone is using the correct provisioning server to download these configs.
5. Always reboot the phone after each step above and test as part of your debugging process.
This article intends to clarify and simplify the process of making custom ring tones for Polycom phones. It is a poorly documented subject even in the Polycom documentation. I would invite readers of this to give me feedback on this article by leaving comments and questions below: ESPECIALLY if you are not able to get it working.
Critiques are always welcomed.