Asterisk cannot find sounds

The problem is rather typical but neither of the solutions worked for me. My Asterisk 11.25 in Entware environment doesn’t see sounds directory. My asterisk.conf looks like this:

directories
astetcdir => /opt/etc/asterisk
astmoddir => /opt/lib/asterisk/modules
astvarlibdir => /opt/lib/asterisk
astdbdir => /opt/lib/asterisk
astkeydir => /opt/lib/asterisk
astdatadir => /opt/lib/asterisk
astagidir => /opt/lib/asterisk/agi-bin
astspooldir => /opt/var/spool/asterisk
astrundir => /opt/var/run/asterisk
astlogdir => /opt/var/log/asterisk
astsbindir => /opt/sbin

Sounds folder in the /opt/lib/asterisk exists, it has 0755 permissions and files have ulaw extensions. But when I use Playback application, it throws

[Aug 2 09:14:27] WARNING[5748][C-00000000]: file.c:701 ast_openstream_full: File hello-world does not exist in any format
[Aug 2 09:14:27] WARNING[5748][C-00000000]: file.c:1017 ast_streamfile: Unable to open hello-world (format (ulaw)): No such file or directory
[Aug 2 09:14:27] WARNING[5748][C-00000000]: app_playback.c:484 playback_exec: ast_streamfile failed on SIP/7001-00000000 for hello-world

File hello-world definitely exists, and when I specify in extensions:

exten => _XXXNXNXXXXXX,n,Playback(/opt/lib/asterisk/sounds/hello-world)

instead of

exten => _XXXNXNXXXXXX,n,Playback(hello-world)

it works.
But other commands like SayAlpha, SayNumber etc., cannot use explicit sounds specification, so this is inapplicable to them. Any suggestions?

It cannot find sounds dir neither with language prefixes (…/sounds/en) nor without them.

Do you have SELinux enabled? Could the Asterisk process be restricted from accessing the files due to an ACL?

I dont think it is a permission issue, because you can access to the sound if you specify the direct path, can you post the output of this command asterisk -x " core show settings" | grep -i dire

1 Like

Skype request or any other comunication outside the forum it is under job section and paid consultancy

The problem is resolved now. The thing was that Asterisk searched in a wrong directory.
As I run Entware version, this version seeked in /opt/var/lib/asterisk/sounds, not in /opt/lib/asterisk no matter what is set in astdatadir variable. And that is dumb, that morons from Entware has broken smth.

Thanks for assistance, guys.

And thanks for the useful command!:wink:

1 Like