Asterisk cannot Play file

Im using asterisk 20, im getting this error, ast_openstream_full File custom/testaudio does not exist in anyformat.
Unable to open custom/testaudio format (ulaw) no such file or directory.
Even though the file is within the folder /var/lib/asterisk/sounds/custom/
is it supposed to be within this folder or should it be in another.

In order for Asterisk to play a file, it must:

  1. Know the path, either relative or explicit.
  2. Permissions must allow access.
  3. The file must be encoded correctly.
  4. The file name in the dialplan must not include the file type.

These commands may yield clues:

sudo /usr/sbin/asterisk -x 'core show settings'\
        | grep 'VarLib directory:'

ls -l <directory from previous command>/custom/testaudio.*

file <directory from previous command>/custom/testaudio.*

Issue was with the path,
in extensions.conf the
Playback(custom/testaudio)
i replaced it to the absolute path /var/lib/asterisk/sounds/en/custom/testaudio

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.