Very often when configuring a PBX, you’ll need to implement system recordings. Recordings are necessary for IVRs and announcements, and can be quite useful in other places such as queues. System recordings can be made by dialing a feature code from an extension within the PBX or by uploading them through the FreePBX admin interface.
For uploaded recordings, there are some specific technical requirements, otherwise Asterisk will not be able to make use of the recording and may exhibit some unusual behavior. Before uploading a system recording, please be sure it matches the following criteria:
- .wav file
- 16 bit
- 8 KHz (8000 Hz)
The easiest way to verify that the audio file in question is correct is to open a terminal in the same directory as the file and execute the following replacing <filename> with the actual name:
The output for a correctly encoded file should be as follows:
<filename>.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
Should the audio file you need to upload not be encoded correctly, it’s necessary to re-encode the file. There are multiple methods of doing this and different people prefer different workflows so I’ll not go into explicit detail regarding various methods, but here are some options:
- Audacity is a free and open source audio editor that can easily handle encoding files in the correct manner.
- VLC is free and open source media player that also handles file encoding. It’s interface is a little easier to make sense of, however the encoding quality typically isn’t as good.
- You can encode files directly from a terminal with ffmpeg if you have it installed on your workstation.
Uploading Audio Files
Within the FreePBX admin interface, select Admin from the menu and click on the System Recordings option. Locate the file upload widget following this message:
Alternatively, upload a recording in any supported asterisk format. Note that if you’re using .wav, (eg, recorded with Microsoft Recorder) the file must be PCM Encoded, 16 Bits, at 8000Hz:
Click the Browse button, select the file on your workstation, and then click the Upload button. Once the upload is complete, enter a name for the recording using Ringfree’s standard naming conventions, and click the Save button. You should then see the recording in the list of available System Recordings within the right sidebar.
Creating a Recording from an Extension
System recordings can also be recorded directly from an extension. Generally this is the preferred method for obtaining recordings from customers.
To create a new recording, dial *77 from any extension, wait for the tone, and record. Once you complete the recording simply hang up, or press # to receive options to review and/or re-record the message. If you’re instructing a customer to create a recording, have them provide you with the extension number used for the recording process as you’ll need it in the next step.
Within the System Recordings view in FreePBX, locate the input immediately following this message:
If you wish to make and verify recordings from your phone, please enter your extension number here:
Enter the extension number that you or the customer used and click the button labeled Go. Finally enter a name for the new recording using Ringfree’s standard naming conventions and click the Save button. NOTE: You may not use any spaces in the name. After clicking Save, You should then see the recording in the list of available System Recordings within the right sidebar.
Implementing System Recordings
Once the recording is saved, it will become immediately available in all places within the PBX that accept/require System Recording input. All of the associated fields use drop-down menus and your new recording will simply be listed in the drop-down.