How do I make an 8 kHz WAV prompt for Asterisk or FreePBX?
By mirai minds Last updated Last verified 3 minute read
The short answer
Asterisk plays a WAV prompt only if it is 16-bit PCM, mono, at 8 kHz, with a lowercase .wav extension; a 16 kHz file needs the .wav16 extension. Anything else, such as a stereo, 44.1 kHz or A-law WAV, logs "Not a supported wav file format" and stays silent. For G.711 calls you can also keep raw .alaw and .ulaw copies, which Asterisk plays without converting. FreePBX's System Recordings converts most uploads for you. Here are the rules from Asterisk's own documentation and source, the warnings each mistake logs, the ffmpeg commands, and a free tool that makes the WAV.
AI agents: ₹5/min to start · ₹1.50/min all-in at volume.¹
- Encoding
- PCM (signed linear)
- Sample rate
- 8 kHz (16 kHz as .wav16)
- Channels
- Mono
- Bit depth
- 16-bit
- Extension
- Lowercase .wav
Read 30 November 2026. Asterisk source, format_wav.c (opens in a new tab)
Make an Asterisk prompt, freeWhat does Asterisk read as a WAV prompt?
Asterisk has its own reader for each file format, chosen by the file’s extension. The WAV reader is strict. Its source file, format_wav.c, describes it as “Microsoft WAV format (8000hz Signed Linear)”, and refuses anything else.
| Setting | What Asterisk reads | Where it says so |
|---|---|---|
| Encoding | PCM (signed linear) | Docs: “The value “wav” represents SLIN in a wav container.” |
| Sample rate | 8 kHz (16 kHz as .wav16) | format_wav.c: a plain .wav is read at 8 kHz |
| Channels | Mono | format_wav.c: “Not in mono” |
| Bit depth | 16-bit | format_wav.c: “Can only handle 16bits per sample” |
| Extension | Lowercase .wav | format_wav.c: “with a lowercase ‘.wav’ extension” |
The other formats Asterisk plays natively are raw files named by their extension: .alaw and .ulaw for G.711, .sln for 8 kHz signed linear (.sln16 at 16 kHz), .g722 and .gsm. Type core show file formats at the Asterisk console to see the list on your server.
Asterisk picks among copies of the same prompt per call: in its documentation’s words, it “plays the sound prompt with the file format that can most easily be converted to the codec of the current call.” So a greeting.alaw beside greeting.wav costs no CPU on an A-law call.
What do Asterisk’s warnings mean?
When a WAV prompt doesn’t play, Asterisk logs why. These are the warnings in format_wav.c, and what each one means.
| Warning in the log | What’s wrong | Fix |
|---|---|---|
| “Not a supported wav file format” | The WAV holds A-law, μ-law, ADPCM or another encoding, not PCM | Convert it to 16-bit PCM (below) |
| “Not in mono” | The file is stereo | Mix it down to one channel with -ac 1 |
| “Unexpected frequency mismatch” | The rate doesn’t match the extension: 44.1 kHz, 48 kHz, or 16 kHz in a plain .wav | Resample to 8 kHz, or save 16 kHz audio as .wav16 |
| “Can only handle 16bits per sample” | 8-bit, 24-bit or 32-bit samples | Write 16-bit samples with pcm_s16le |
| “Not a GSM file” or “Unexpected header size” | The file is named .WAV in capitals, which Asterisk reads as GSM in a WAV container (wav49) | Rename it with a lowercase .wav |
How do I convert a prompt with ffmpeg?
For the WAV Asterisk reads:
ffmpeg -i prompt.mp3 -ar 8000 -ac 1 -c:a pcm_s16le prompt.wav For raw G.711 copies beside it, A-law and μ-law:
ffmpeg -i prompt.wav -ar 8000 -ac 1 -f alaw prompt.alawffmpeg -i prompt.wav -ar 8000 -ac 1 -f mulaw prompt.ulaw A raw G.711 file has no header, one byte for each of the 8,000 samples a second, so it’s half the size of the 16-bit WAV. Check the WAV before you copy it to the server:
ffprobe -hide_banner prompt.wav# Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, s16, 128 kb/s What does FreePBX do with an upload?
FreePBX converts it. Its System Recordings module takes WAV, MP3, FLAC, OGG and other formats, and under Convert To you pick the formats each recording is saved in, among them ulaw, alaw, sln, g722 and wav. Choose the formats your trunks’ codecs use, so calls play the prompt without converting it.
If you copy files into Asterisk’s sounds directory by hand instead, FreePBX’s converter never sees them, and the rules above apply.
Can I make the prompt at 8 kHz from the start?
Yes. Our free IVR voice generator speaks your prompt in Hindi, Hinglish, English or seven more Indian languages, in one of four Indian voices. Download the WAV · 16-bit PCM file: 8,000 Hz, mono, 16-bit, the WAV Asterisk reads as it is. Its A-law and μ-law files are G.711 WAVs for systems that ask for those; Asterisk’s WAV reader won’t take them, so make raw .alaw or .ulaw files with ffmpeg as above.
Can an AI agent answer instead of a recorded menu?
Yes. A Voice Infra agent picks up, hears what the caller wants in their own language and answers it, in about 850 ms end to end. It connects to your PBX over a SIP trunk, or runs on our own Indian numbers. Agents cost ₹5 a minute to start, with our phone line included, and ₹1.50 a minute all-in at volume, before GST. See what each plan includes.
These are the references this guide is built on.
References reviewed on . Each one is the official page or document, never a blog. Rules and upload pages change; check the source before you rely on a line, and tell us at sneh@miraiminds.co if one has moved.
- Asterisk documentation: audio and video capabilities (file formats) (opens in a new tab) docs.asterisk.org
- Asterisk documentation: exploring sound prompts (format chosen per call) (opens in a new tab) docs.asterisk.org
- Asterisk documentation: the Record application (core show file formats) (opens in a new tab) docs.asterisk.org
- Asterisk source: formats/format_wav.c (the WAV reader and its warnings) (opens in a new tab) github.com
- Asterisk source: formats/format_wav_gsm.c (WAV in capitals read as GSM) (opens in a new tab) github.com
- Sangoma: FreePBX System Recordings module user guide (page version 24 February 2026) (opens in a new tab) sangomakb.atlassian.net
- Wazo administration guide: sound files (opens in a new tab) wazo-platform.org
- ITU-T G.711: pulse code modulation of voice frequencies (opens in a new tab) itu.int
- FFmpeg documentation: audio options -ar and -ac (opens in a new tab) ffmpeg.org
These are the questions businesses ask us most.
Have a question we did not answer?
Book a 15-minute call with Sneh, the founder.
What WAV format does Asterisk need?
16-bit PCM, mono, at 8 kHz, saved with a lowercase .wav extension. Asterisk's WAV reader says so in its own warning: only PCM encoded, 16 bit, mono, 8kHz/16kHz files are supported with a lowercase .wav extension. A 16 kHz file needs the .wav16 extension.
What does "Not a supported wav file format" mean in Asterisk?
The WAV isn't plain PCM: it's A-law, μ-law, ADPCM or another encoding inside a WAV container, so Asterisk's WAV reader refuses it. Convert it with ffmpeg -i prompt.wav -ar 8000 -ac 1 -c:a pcm_s16le prompt-8k.wav.
Should I use .wav or .alaw files in Asterisk?
Either works. Asterisk plays a prompt in whichever format is cheapest to convert to the call's codec, so if most of your calls are G.711 A-law, a raw .alaw copy next to the .wav plays without any conversion. Keep the .wav as the master.
Does FreePBX convert uploaded recordings?
Yes. FreePBX's System Recordings module takes WAV, MP3 and 20 more formats, and encodes each recording into the formats you pick under Convert To, such as ulaw, alaw, sln, g722 and wav.
Why does Asterisk say "Not a GSM file" for my WAV?
Because the file is named .WAV in capitals. Asterisk reads that extension as GSM audio in a WAV container, the format called wav49, so a 16-bit PCM file fails the check. Rename it with a lowercase .wav.
Which file from the free generator should I use on Asterisk?
The WAV · 16-bit PCM file: 8,000 Hz, mono, 16-bit, which Asterisk reads as it is. Its A-law and μ-law WAVs are for systems that ask for G.711 WAV files; Asterisk's WAV reader takes PCM only, so for G.711 prompts make raw .alaw or .ulaw files with ffmpeg instead.
Keep reading before you call, or hear an agent first.
Keep reading
Plans and free tools
Calls and languages
Start with ₹200 of free calls today.
₹200 of credit, about 40 minutes of calls. Just your email.
Talk with agent
Just your mic. No phone number.
Ankit calls you in 60 seconds
Leave your number. Our AI agent calls you and asks about your business. Calls go out 10:00–21:00 IST.
Ankit is calling you