Playing media from a URL

I’m running asterisk inside a docker container. To be able to play a media file, it needs to be present in var/lib/asterisk/sounds. Is there a way to
a) play a media file from a URL?
OR
b) copy a media file to var/lib/asterisk/sounds path without using docker cp?

Just to cover this base…

If you give Asterisk an absolute file path (the file path you reference in your post is relative), the file can be anywhere in the filesystem, for example /tmp/ or a Docker volume mounted somewhere in the filesystem.

I haven’t done this myself but maybe look at trying docker volumes and link the host configuration of /var/lib/asterisk/sounds to the container. This way you can just keep the host file up to date.
Including something like;
docker-compose.yml
nginx:
volumes:
- ./nginx/var/lib/asterisk/sounds:/var/lib/asterisk/sounds
- “host file path:container file path”

I am looking to set this up soon myself so would be great if you could share once successful.

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