Asterisk

I have recently had to setup an Asterisk server. I decided to use Ubuntu because I wanted to utilize the server for a few other low priority things. As I was setting up the server I noticed that it complained about not finding a custom sound that I had recorded.

[Oct 27 00:22:05] WARNING[4136]: file.c:653 ast_openstream_full: File custom/TestWelcome does not exist in any format
[Oct 27 00:22:05] WARNING[4136]: file.c:959 ast_streamfile: Unable to open custom/TestWelcome (format 0x4 (ulaw)): No such file or directory
[Oct 27 00:22:05] WARNING[4136]: pbx.c:9579 pbx_builtin_background: ast_streamfile failed on SIP/xxxxxxxxxxxx for custom/TestWelcome

After some troubleshooting I found out that the Ubuntu packages configured Asterisk to look in /usr/share/asterisk/sounds/ instead of /var/lib/asterisk/sounds/ where the custom sound was being saved to. A quick fix for this is to create a sym link.

ln -s /var/lib/asterisk/sounds/custom /usr/share/asterisk/sounds/custom

I think the correct way might be to edit astdatadir in /etc/asterisk/asterisk.conf, but that’s something that I still need to research.

Back to blog...