Non-English sound recordings

I use FreePBX 13 + Asterisk 13.9 in Gentoo. When I use English as global sound language everything works fine. But I live in Russia and need to use Russian sound files. When I set Russian as global sound language, download Russian sound files and delete English ones, I get such error messages:

[2016-07-12 21:49:40] WARNING[3263][C-00000001] file.c: File custom/XYZ does not exist in any format [2016-07-12 21:49:40] WARNING[3263][C-00000001] file.c: Unable to open custom/XYZ (format (alaw)): No such file or directory [2016-07-12 21:49:40] WARNING[3263][C-00000001] pbx_builtins.c: ast_streamfile failed on PJSIP/BlaBlaBla-00000001 for custom/XYZ

No need to note that the file is in place. If I make a symlink in such way:
ln -s /var/lib/asterisk/sounds/{ru,en}
everything works fine again.

I’m sure Asterisk looks for files only in the folder with English sound files. Or maybe FreePBX inciorrectly configures the paths.


you should never delete the English files as they are the core of the system. Instead install your language form the global settings. Also check these two links for more information

Change audio language <-- see comment of gustavoberman

I noticed that some original Asterisk prompts are “overruled” by a bunch of english prompts residing directly in /var/lib/asterisk/sounds. Examples are “welcome to the phone book” (and other phonebook related prompts), but FreeBX uses instead “welcome-to-phonebook.sln” . If this link is deleted, then the prompt disappears completely, so there is no fall-back to the original asterisk prompts and thus not for other languages. Is there a simple fix for this ?

Thank you, but:

  1. These instructions are for older versions of FreePBX.
  2. I have no “Language” option in “Asterisk SIP Settings”.
  3. I can make Russian the default language of recordings using the FreePBX interface. “Admin” - “Sound Languages” - “Change global sound language”.
  4. I can download Russian sounds using the FreePBX interface. No need to download them from anywhere else.
  5. I want it to work according to the logic of the program. If it’s a well-known bug - I’ll create a new issue in the tracker.

There was a full discussion of a similar sound file setup a couple of week ago (he was installing French sound files as I recall). It seems to me that there were three place that needed to be updated for the files to work, and the directory structure for the foreign language packs was critically correct in getting it working. I think the directory structure naming convention violated the “rule of least astonishment”.

Maybe @dicko can chime in - I think he got the last guys squared away. A pointer to that discussion would probably solve this pretty quickly.

Start here for how the system finds which file to play

a couple of notes, there is hardcoded in asterisk a lot of en_US which is an alias for the files in /sounds/en so I would not remove that directory. You should best have versions of that sound file suitable for each codec used, and you might need a license to transcode to/from g729 for example. If a particular file isn’t available to asterisk for permissions or licensing restrictions you will fall through all the way to /asterisk/sounds/ just as that link says.

So if the channel language is ru and the codec is alaw, then custom/XYZ will look for XYZ.alaw in

and finally

if not found either XYZ.alaw then XYZ.slin or XYZ.wav would normally be transcoded to alaw. if nothing works you will get that error of “not found”

The problem is not Asterisk, but FreePBX “hardcoding” by using specific links to other English-only prompts (see higher), especially for the phone book directory.

Just place your version of “welcome-to-phonebook” etc. in whatever language you want in the relevant directory described above, believe me asterisk will use that search path based on the Language of the current channel.

Same goes for any translations you have for “phone book directory”

has sounds in russian but you might need to track down the extra sound files in Russian from somewhere else.

I’d like to believe you, but something prevents :-).

What I did right now. Removed symlink “/var/lib/asterisk/sounds/en” which I made before. Added English sounds using the FreePBX interface. Set the default language of recordings to Russian.

So at this moment I had “sounds/en”, “sounds/ru” and my custom recordings in “sounds/ru/custom”.

Made a call. Silence at the other end. New messages in the log:

[2016-07-13 23:47:22] WARNING[2524][C-00000000] file.c: File custom/XYZ does not exist in any format [2016-07-13 23:47:22] WARNING[2524][C-00000000] file.c: Unable to open custom/XYZ (format (alaw)): No such file or directory [2016-07-13 23:47:22] WARNING[2524][C-00000000] pbx_builtins.c: ast_streamfile failed on PJSIP/BlaBlaBla-00000000 for custom/XYZ

This means that Asterisk DOES NOT look in the “sounds/ru/custom” directory.

Copied “sounds/ru/custom” to “sounds/en/custom”. Made a call. My IVR talked to me in Russian but after I pressed a key to leave a message I heard the prompt “Please leave a message…” in English.

This means that Asterisk DOES NOT look in the “sounds/ru” directory AT ALL.

After I reverted the configuration to the previous state, with “/var/lib/asterisk/sounds/en” symlinked to “/var/lib/asterisk/sounds/ru”, I hear the IVR and the prompt “Please leave a message…” in Russian.


Custom files come from you. Freepbx does not put any files in custom unless it’s user generated through system recordings.

But you keep changing your log files to “custom/xyz”.

Point being we need to see the full context of the problem. Everyone is guessing because you keep limiting the amount of information you are showing.

Asterisk (not FreePBX) looks for sound files in the directory structure starting at the value of “Language” in the current channel , and then downwards as documented, that file must be readable and possibly transcode-able by those basics, if your inbound route that started the call doesn’t specifically define it’s language it will likely be the default (en), also make sure your advanced settings specifically define “ru” as your default language.

I have NEVER had a problem with that concept in many years. Unless for some strange reason your /etc/asterisk/asterisk.conf file does NOT contain


If you can tell me what information I should give - i’ll give it.

Anyway, thank you for paying attention to my problem.

Call trace of when the issue happens

No, my /etc/asterisk/asterisk.conf file DOES contain languageprefix=yes :-).

May it be linked to the fact that I’m using the latest release of PJSIP? I’ll try to check whether it will recur when using old good SIP in the nearest future.

Could you please tell me where I can get information about how to get the call trace?

You’ve been posting three lines of a call trace this whole time. Please post the full call trace (call log)

I thought you mean some kind of special log. Here is the trace.

grep 2524 /var/log/asterisk/full

Should get what has been asked those three linew you keep on posting are not the complete call

What you posted is not a call trace. Please do exactly what dicko said.

No difference:
[2016-07-13 23:47:22] WARNING[2524][C-00000000] file.c: File custom/redan19-09ru does not exist in any format [2016-07-13 23:47:22] WARNING[2524][C-00000000] file.c: Unable to open custom/redan19-09ru (format (alaw)): No such file or directory [2016-07-13 23:47:22] WARNING[2524][C-00000000] pbx_builtins.c: ast_streamfile failed on PJSIP/Seagulltel-00000000 for custom/redan19-09ru